Q: 5
4 4
3 3 3
2 2 2 2
1 1 1 1 1
#include #include void main() { int i,j=1,n,k=1; clrscr(); printf("enter value of n:"); scanf("%d",&n); for(i=n;i>=1;i--) { printf("\t\n"); for(k=1;k<=j;k++) { printf("%d",i); } j++; printf("\t\n"); } getch(); }
No comments:
Post a Comment