Original Post
im trying to integrate a do while statement for my program but i get an error saying answer is an undeclared identifier. i just want the user to select yes or no to continue the program.
heres my code.
#include
#include
int main()
{
do{
cout<<"Package program in cm."<>length;
if(length>10)
cout<<"pass";
else if(length<10)
cout<<"fail";
//width
double width;
cout<<"What is the width of the package?";
cin>>width;
if(width>10)
cout<<"Pass";
else if(width<10)
cout<<"Fail";
double temp;
double wind;
cout<<"What is the temperature today?";
cin>>temp;
cout<<"What is the wind speed?";
cin>>wind;
cout<<"\n";
if((temp<5) || (wind>24))
cout<<"you aught to wear a cote today lad"<>strokes;
if(strokes==1)
cout<<"Hole in one"<>Answer;
} while (Answer==''Y'');
cout<<"This sure is a special program aint it"<