Information
Enter two integers greater than 0: 50 3
Value Value^2 Value^3
-----------------------------
3 9 27
6 36 216
9 81 729
12 144 1728
15 225 3375
18 324 5832
21 441 9261
24 576 13824
27 729 19683
30 900 27000
33 1089 35937
36 1296 46656
39 1521 59319
42 1764 74088
45 2025 91125
48 2304 110592
You'll notice that you're printing the stride in the left column, the stride squared in the
middle column, and the stride cubed in the right column. Then, you increment the stride by itself
and print out the new values on the next line. Continue until the value in the left column is
greater than the range that was input.
Your output must match exactly.
Approximate number of lines of code: 10.
The name of the file should be squares2.c and the command to compile it will look like this:
When you've got it working, use these files to redirect the input into output files. For example:gcc -Werror -Wall -Wextra -ansi -pedantic squares2.c -o squares2 -O2 -Wno-unused-result
Input files:squares2 < input50-3.txt > myoutput50-3.txt
Output files: (You'll notice that the input numbers are not in the output, nor is the extra blank line.)
Notes