Basically what I am trying to do is get the width and height of the doors in a room. The user enters the number of doors in the room, it then goes into a for loop which then asks for the width and height of each wall.
The problem is I need to work out the area of each door but it just will not work!
Heres my code
for (int door = 1; (door < 2); door++)
{
cout << "Enter the width of door" << door << " ";
cin >> doorW[door];
cout << "Enter the height of door" << door << " ";
cin >> doorH[door];
door = door[door] * door[door]; // works ok
cout << "Total area of all doors " << door;
total_door = door[door] + door[door]; // this does not work
}
Any ideas? Thanks :)
Any ideas?