1
0

Tell the player if they guess lower or higher than the target.

This commit is contained in:
Captain ALM 2022-08-26 14:32:00 +01:00
parent cc4d91adf2
commit 9fae0e4409
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -16,7 +16,12 @@ int main()
bool once {}; bool once {};
int num {clamp(rand)}, ent {}; int num {clamp(rand)}, ent {};
do { do {
if (once) std::cout << "You Guessed Wrong!\n"; if (once) {
if (ent > num)
std::cout << "You Guessed Too High!\n";
else
std::cout << "You Guessed Too Low!\n";
}
ent = promptfi("Enter your guess:"); ent = promptfi("Enter your guess:");
once = true; once = true;
} }