c Program to display the number in a specific formats


Program to display the number in a specific formats
Program
#include<stdio.h>
void main()
{
int r, s, n, key;
printf("\nEnter the Value of n : ");
scanf("%d", &n);
key = 1;
for(r = 1; r <= n; r++)
{
for(s = 1; s <= r; s++)
printf("%3d", key++);
printf("\n");
}
}

No comments: