-4

I am writing a problem that will determine how much paint a user needs to paint their house. The program will ask them "how many rooms are in your house?", and then ask, for example, "what are the dimensions of room 1", then "what are the dimensions of room 2" until it asks them "what are the dimensions of room 9" if they inputted, say, 9 rooms. How would I write a program to ask the user the dimensions of however many number of rooms they inputted?

Michael
  • 1
  • 1

1 Answers1

0

You should fill this skeleton of algorithm :

int rooms = ...;
for (int i = 0; i < rooms; i++) {
  //ask dimensions
}
Dici
  • 25,226
  • 7
  • 41
  • 82
ControlAltDel
  • 33,923
  • 10
  • 53
  • 80