Output :Code:#include<stdio.h> main() { int a,b,c; clrscr(); printf("input : ");scanf("%d",&c); for(a=1; a<=c; a++) { for(b=1; b<=a; b++) printf("%d",b); printf("\n"); } getch(); }
1
12
123
I try to make it like this:
1
12
123
12
1
but i always get this :
1
3
12
3
123
3