Number Guessing Game
GlobalLoops
Created by pattakorn.k on Oct 1, 2026
Pseudocode
// PSC:1.0 GuessingGame
// Description: Keeps asking for guesses until the secret number is found
BEGIN GuessingGame
LET secret = 42
LET attempts = 0
REPEAT
INPUT "Guess the number: " guess
LET attempts = attempts + 1
IF guess < secret
OUTPUT "Too low"
ELSE IF guess > secret
OUTPUT "Too high"
END IF
UNTIL guess = secret
OUTPUT "Correct! You took " attempts " guesses"
ENDInteractive Preview
Generating flowchart…