Hi everyone, new to the board here as well as the language. I am in my first year of learning C++ and my instructor requires we write a program that does a simple calculation. I am getting no errors in my program, however, the parser gets to the last cin >> statement and exits without showing the calculations. Any help would be gladly appreciated.
CODE
#include <iostream>
using namespace std;
void main(void)
{
float wallLength1;
float wallWidth1;
float wallLength2;
float wallWidth2;
float doorLength;
float doorWidth;
float windLength;
float windWidth;
const double rollLength = 20;
const double rollWaste = 0.15;
float windArea;
float doorArea;
float roomArea;
float newRolls;
float rollsRequired;
cout << "Enter the Length of the first wall: ";
cin >> wallLength1;
cout << "Enter the Width of the first wall: ";
cin >> wallWidth1;
cout << "Enter the Length of the second wall: ";
cin >> wallLength2;
cout << "Enter the Width of the second wall: ";
cin >> wallWidth2;
cout << "Enter the Length of the door: ";
cin >> doorLength;
cout << "Enter the Width of the door: ";
cin >> doorWidth;
cout << "Enter the Length of the window: ";
cin >> windLength;
cout << "Enter the Width of the window:";
cin >> windWidth;
windArea = windLength * windWidth;
doorArea = doorLength * doorWidth;
roomArea = ((wallLength1 * wallWidth1) + (wallLength2 * wallWidth2)) * 2;
newRolls = rollLength - (rollLength * rollWaste);
cout << "The amount of rolls required is ";
rollsRequired = ((roomArea - windArea - doorArea)/newRolls);
return;
}