May I have your advice on the generation of the following number pattern using nested for loops? Thank you so much ~
2 4 6
7 9 11
12 14 16
17 19 21
But I can only figure out
2 4 6
3 5 7
4 6 8
5 7 9
and below is the code:
Code:#include <stdio.h> int main() { int i, j; for (i=0; i<4; i++){ for (j=2; j<7; j=j+2){ printf("%d ", i+j); } printf("\n"); } getchar(); return 0; }