URI Online Judge | 1144 Logical Sequence
Adapted by Neilor Tonin, URI Brazil Timelimit:1
Problem Description:
Problem Number:1144
Problem Name: Logical Sequence
Author’s Name: Adapted by Neilor Tonin, URI Brazil Timelimit: 1
Problem Category: BEGINNER.
Problem Source: https://www.urionlinejudge.com.br/judge/en/problems/view/1144
#include <stdio.h>
int main()
{
int a,b,c,d,e,f;
scanf("%d", &a);
for(b=1; b<=a; b++)
{
c=b*b;
d=b*b*b;
printf("%d %d %d\n",b,c,d);
e=c+1;
f=d+1;
printf("%d %d %d\n",b,e,f);
}
return 0;
}
0 comments:
Post a Comment