Chapter 2: Problem 31
(Table of Squares and Cubes) Using only the programming techniques you learned in this chapter, write an application that calculates the squares and cubes of the numbers from 0 to 10 and prints the resulting values in table format, as shown below. [Note: This program does not require any input from the user.] $$\begin{array}{lll} \text { number } & \text { square } & \text { 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 \end{array}$$
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.