can someone help me, my code won't compile.
#include <iostream>
#include <string>
using namespace std;
int main()
{
int hi, lo, mid;
bool found;
char status, reply;
do
{
cout << "Think of a number between 0 and 1000" << endl;
cout << " Write it down, I will guess it" << endl;
hi = 1001;
lo = 0;
found = flase;
while((hi >= lo) && (!found))
{
mid = (hi + lo) /2;
cout << "is" << mid << "H) igh, L) ow, or C) orrect?"
<< endl;
cin >> status;
switch (toupper(status))
{
case 'H':
hi = mid;
break;
case 'L':
lo = mid
break;
case 'C':
found = true;
break;
default:
cout << "Invalid response!" << endl;
}
}
if(hi < lo)
cout << "You cheated" << endl;
else
cout << "Your number is " << mid << endl;
cout << endl;
cout << "Do you want to go again? Y or N" << endl;
cin >> reply;
}while(toupper(reply) == 'Y';
return 0;
}