Hi, im having trouble with simple problems with c++ and i just started up. I am trying to Determine what shirt size a person will wear if they weight from 100 - 199 lbs but i just dont know how do run it, the screen goes blank after i type in there weight. heres the code i have so far.
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
//local constants
const int MIN_WEIGHT=100;
const int MAX_WEIGHT=199;
//local variables
int WEIGHT; //Weight of customer
float SMALL; //Shirt Size is Small
float MEDIUM; //Shirt Size is Medium
float LARGE; //Shirt Size is Large
float NO_SHIRT; //No shirt
/***************************start main program*******************/
//Input Customers weight
cout << "Customers weight :" ;
cin >> WEIGHT ;
//Clear the screen
system("cls");
if (WEIGHT <=100 && WEIGHT >= 200)
{
if (NO_SHIRT)
{
(WEIGHT <=100 && WEIGHT >= 200);
cout << "No Shirt"<<endl;
//Display NO_SHIRT
}
else if (SMALL)
{
(WEIGHT <=135 && WEIGHT >= 100);
cout << "Small Shirt"<<endl;
//Display SMALL
}
else if (MEDIUM)
{
(WEIGHT <=136 && WEIGHT >= 165);
cout << "Medium Shirt"<<endl;
//Display MEDIUM
}
else (LARGE);
{
(WEIGHT <=166 && WEIGHT >= 199);
cout << "Large Shirt"<<endl;
//Display LARGE
}
}
//Display Shirt Size
//pause the output screen for viewing
system("pause");
//return 0 to OS
return 0;
}//end main program