URI Online Judge Solution 1095 Sequence IJ 1 using C Programming Language.
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 Sample | Output Sample |
I=1 J=60
I=4 J=55 I=7 J=50 ... I=? J=0 |
Solution using C :
#include <stdio.h>
int main() {
int i=1,j=60;
while(j>=0)
{
printf("I=%d J=%d\n",i,j);
i += 3;
j -= 5;
}
return 0;
}
Comments
Post a Comment