URI Online Judge | 1096
Sequence IJ 2
Make a program that prints the sequence like the following exemple.
Input
This problem doesn't have input.
Output
Print the sequence like the example below.
Input Sample | Output Sample |
I=1 J=7 I=1 J=6 I=1 J=5 I=3 J=7 I=3 J=6 I=3 J=5 ... I=9 J=7 I=9 J=6 I=9 J=5 |
Solution:
#include <stdio.h> int main() { int I,J; for(I=1;I<=9;I=I+2) { for(J=7;J>=5;J--) printf ("I=%d J=%d\n",I,J); } return 0; } |
Post a Comment
0Comments