Print right angle triangle pattern - C Program

Write a program to print following output:

input right angle triangle

Solution:

#include<stdio.h>
int main()
{
      int i,j;
      for(i=1;i<=5;i++)
      {
            
            for(j=1;j<=i;j++)
            {
                  printf("* ");
            }
            printf("\n");
      }
      return 0;
}


Output:

right angle triangle