Number Pattern In C
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
#include<stdio.h>
4 4 4 4
3 3 3
2 2
1
#include<stdio.h>
#include<conio.h>
void main()
{
int n=5;
int i,j,k;
for(i=n;i>=1;i--)
{
for(k=n-1;k>=i;k--)
{
printf(" ");
}
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
No comments:
Post a Comment