Hello, this is my first forum post.
I am new to C++, and have come across difficulties with the following
program I've written. The goal of the program is to obtain the first and last
integers of a sequence from the user, then to create 3 columns: the first stating the integer, the second squaring that integer, the third cubing that integer. The integer increases by one with each row until the last integer the user provided is reached. Desired output:
Enter starting value: 2
Enter ending value: 5
X X SQUARED X CUBED
2 4 8
3 9 27
4 16 64
5 25 125
For your desired output, first, you don't need to have the "\n"s after the "cin" statements, due to cin automatically giving a newline to the output. Also, in line 13, you are inputting into "start", you probably want to input into "end".