1. Write code that will request the length and width of a rectangle until 0 is entered for either the length or the width. Print the area and perimeter for each set of inputs.
2. Write code that will input a number and print the number, the square of the number, and the cube of the number. Continue the operation until 999 is entered.
Al-right, write down the steps you need to follow in English.
Start out with some very general things, then go back and refine these steps with more detail. Keep doing this until yo are happy to convert into code.
Some questions to keep in mind :
What variables do you need, and what type should they be?
How are you going to organise the looping?
Could you make use of some functions?
There's a few ways of writing this, but it looks like your topic is that of parameter lists and passing by reference vs value or something similar.
It should look something like
1 2 3 4 5
void recData( float &length, float &width )
// do stuff in the body
void thirdTimeCharm( float &base )
// do 3 things to your number, and no you do not need to use <cmath>. Basic exponentiation.