URI / BEE CROWD 1143 - Squared and Cubic - Solution in C,C++,Python | URI - BEECROWD - BEE 1143 Solution in C,C++,Python
beecrowd | 1143
Squared and Cubic
Adapted by Neilor Tonin, URI Brazil
Timelimit: 1URI / BEE CROWD 1143 - Squared and Cubic - Solution in C,C++,Python | URI - BEECROWD - BEE 1143 Solution in C,C++,Python :
Write a program that reads an integer N (1 < N < 1000). This N is the number of output lines printed by this program.
Input
The input file contains an integer N.
Output
Print the output according to the given example.
Input Sample | Output Sample |
5 | 1 1 1 |
URI / BEE 1143 Solution in C :
URI / BEECROWD Online Judge 1143 Solve in C : |
#include<stdio.h>
int main(){
int N,i;
scanf("%d", &N);
for(i = 1; i <= N;i++){
printf("%d %d %d\n",i,i*i,i*i*i);
}
return 0;
}
0 Response to URI / BEE CROWD 1143 - Squared and Cubic - Solution in C,C++,Python | URI - BEECROWD - BEE 1143 Solution in C,C++,Python
Post a Comment