(C++) help me with this question

*for loop
using for loop, write a program that calculate the square and cubes of the number from 0 to 10 inclusively and display the output as stated:

the number=0, the square is=0, the cube is=0
the number=1, the square is=1, the cube is=1
the number=2, the square is=4, the cube is=8
1
2
3
4
for(unsigned int i = 0; i <= 10; i++)
{
	std::cout << "The number is = " << i << ", the square is = " << i*i << ", the cube is = " << i*i*i << "\n";
}


If unable to wrap your head around the for loop, I suggest a different course.
thanks dude
Everybody gets one.
Topic archived. No new replies allowed.