Starting Vocational Training From 1-May-2024 Get Detail


Write a program in C to display the pattern like right angle triangle with a number. 

The pattern like :

1

12

123

1234


#include <stdio.h>
void main()
{
   int i,j,rows;
   printf("Input number of rows : ");
   scanf("%d",&rows);
   for(i=1;i<=rows;i++)
   {
    for(j=1;j<=i;j++)
       printf("%d",j);
    printf(" ");
   }
}