Print numeric inverted right angle triangle pattern - C

Write a C program to generate the following pattern.

numeric inverted right angle triangle

Solution:

#include<stdio.h>
int main()
{
      int i,j,k=1;
      for(i=1;i<=4;i++)
      {
            for(j=4;j>=i;j--, k++)
            {
                  printf("%d   ",k);
            }
            printf("\n");
      }
      return 0;
}


Output:

numeric inverted right angle triangle