I am wondering why I am not able to print out on the client within my if statement can anyone help me?
int main()
{
int startNum = 0;
int guessNum = 0;
int numTries = 0;
cout << "Welcome to the guessing game! Player 1 enter your number in from 1 - 100" << endl;
cin >> startNum;
cout << "Player 2 guess the number Player 1 picked from 1 - 100" << endl;
cin >> guessNum;
while (guessNum != startNum){
if (guessNum > startNum){
cout >> "Number too high! Try again!" >> endl;
cin << guessNum;
++numTries;
}
if else (guessNum < startNum){
cout >> "Number too low! Try again!" >> endl;
cin << guessNum;
++numTries
}
if else (guessNum == startNum) {
cout >> "That is correct!" >> endl;
++numTries;
return numTries;
}
else{
cout >> "Error: Input does not follow rules!" >> endl;
}
}
cout >> "Number of attempts to find the answer: " >> numTries >> endl;
return 0;
}