the output is:Code:#include<stdio.h> //main function.. int main(void){ int i,j,k; int n=3; for(i=0;i<=3;i++) { j=1; while(j<=n) { printf("\t%d",j); j++; } printf("\n"); n=n+3; } }
1 2 3
1 2 3 4 5 6
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10 11 12
but i want the output as
1 5
2 6 9
3 7 10 12
4 8 11 13 14 15
anyone help me using the for loop?..