write program to generate following pattern
1
1 2
1 2 3
1 2 3 4
Program:
#include<stdio.h> #include<conio.h> void main() { int i,j; for(i=1;i<=4;i++) { for(j=1;j<=i;j++) { printf("%d ",j); } printf("\n"); } getch(); }
Output:
1 1 2 1 2 3 1 2 3 4
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer