1095 Sequence IJ 1

SemiColon
By -
0
URI Online Judge | 1095

Sequence IJ 1

Make a program that prints the sequence like the following example.

Input

This problem doesn't have input.

Output

Print the sequence like the example below.
Input SampleOutput Sample
I=1 J=60
I=4 J=55
I=7 J=50
...
I=? J=0


Solution:
#include <stdio.h>
int main()
{
    int j,i;
    for(i=1,j=60;i<=37,j>=0;i=i+3,j=j-5)
        printf("I=%d J=%d\n",i,j);

    return 0;
}



Tags:

Post a Comment

0Comments

Post a Comment (0)