library CB-Console; library CB-Random; fn main() { println("ClosedBit Guessing Game"); println("Guess a number from 1 through 5."); u256 secret = random.range(1, 6); bool won = false; for (u256 turn = 1; turn <= 3; turn += 1) { u256 guess = input.number("Guess: "); if (guess == secret) { println("Correct. You win."); won = true; break; } else if (guess < secret) { println("Too low."); } else { println("Too high."); } } if (!won) { println("Out of turns. The answer was " + secret + "."); } }