#include <stdio.h>
void main()
{
int row, i,c,x = 1;
printf("Enter the no, of row\n");
scanf("%d", &row);
for (i = 1; i <= row; i++)
{
for (c = 1; c <= i;c++)
{
printf("%d ",x);
x++;
}
printf("\n");
}
}
void main()
{
int row, i,c,x = 1;
printf("Enter the no, of row\n");
scanf("%d", &row);
for (i = 1; i <= row; i++)
{
for (c = 1; c <= i;c++)
{
printf("%d ",x);
x++;
}
printf("\n");
}
}
No comments :
Post a Comment