simple question that baffles me. attempting to get multiple data from a user, but cannot get the program to "wait" for the data. It spits out all the questions at once.
here's what I have written
//woody0114
#include <iostream>
#include<cmath>
using namespace std;
double HSF(double ft_height, double ft_width, double s_height, double s_width, double g_area);
double WDarea(double w_height, double w_width, double d_height, double d_width );
int main()
{
double hsf;
char nom;
double ft_height, s_height, ft_width, s_width, g_area, doors, windows;
cout<<"Welcome to the Cheap Paint Company, Please tell me your name.\n";
cin >>nom;
cout<<"Enter the height of the front of your house from the bottom of the siding to the soffit\n";
cin >>ft_height;
cout<<"Enter the width of the front of your house\n";
cin >>ft_width;
cout<<"Enter the height of the side of your house from the bottom of the siding to the gable tip\n";
cin>>s_height;
cout<<" Enter the width of the side of your house\n";
cin>>s_width;
hsf= HSF(ft_height, ft_width, s_width, s_height, g_area);
cout<<nom<<"The initial square footage of your house is"<<hsf<<"square feet";
system("PAUSE");
return EXIT_SUCCESS;
}
double HSF(double ft_height, double ft_width, double s_height, double s_width, double g_area)
{
double hsf, squarefoot;
squarefoot = (ft_height*ft_width)+(ft_height*s_width);
g_area= (s_height-ft_height)*s_width;
hsf = squarefoot + g_area;
return (hsf);
It asks the first question and allows the user to input their name, then the program spits out the other questions all at once and does not allow for the cin info to be input