-->
当前位置:首页 > 题库

PROGRAMMING:Table of Squares and Cubes

Luz5年前 (2021-05-10)题库443
Using only the techniques you learned in this chapter, write
a program that calculates the squares and cubes of the numbers from 0 to 10 and print
the following table of values:
![ number_ squre_ cube.png](~/6cc338bb-594a-430e-8d15-a8b171d9bc5d.png)
###Input Specification:
No input.
###Output Specification:
Print "number square cube" in the first line. Separating each word by 2 spaces.
From the second line, print a group of numbers, the square and the cube at each line. the first digit of each number align to the first letter of each word in the first line. There's no space at the ending of each line.
###Sample Input:
```in
```
### Sample Output:
```out
number square cube
0 0 0
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1000
```







answer:If there is no answer, please comment