Hello,
I tried but it won't compile
Code:
#include <iostream>
#include <string>
int main()
{
using namespace std;
string home_score;
int teller ;
bool test, result;
do
{
test=true;
result=true;
cout << "Enter the home score: ";
getline(cin, home_score);
for (teller, home_score.length, teller++) {
if (home_score.at[teller] > "1" && home_score.at[teller] < "9")
{
test=true ;
else
test=false;
}
if test=false {
result=false ;
cout "You entered a wrong value ";
} }
}
while (result=false) ;
cout << "You entered: " << home_score << endl;
return 0;
}
Roelof