Tell the player if they guess lower or higher than the target.
This commit is contained in:
parent
cc4d91adf2
commit
9fae0e4409
7
main.cpp
7
main.cpp
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user