In pseudocode
num2guess = random(1,100)
pnum = 0
while (pnum != num2guess) {
pnum = ask_player("What number I'm thinking?")
if (pnum > num2guess) {
print("Too high.")
} else if (pnum < num2guess) {
print("Too low.")
}
print("Good job!")
8.5m questions
11.2m answers