1 2 3 4 5
6 7 8 9
10 11 12
13 14
15
#include<stdio.h>
int main()
{
int i,j,k;
k=1;
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf("%3d",k++);
}
printf("\n");
}
return 0;
}
Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C
#include
ReplyDeleteint main()
{
int k=1,i,j,n;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=n;j>=i;j--)
{
printf("%d",k++);
}
printf("\n");
}
return 0;
}
I don't think comment above is correct
ReplyDeleteWconsligcen_ku Tammy Sousa https://www.tdbsc.com/profile/redcliffemichala/profile
ReplyDeletetalchaesleevin