From 0036f72aed657e86107d208e11efc83285dd8f19 Mon Sep 17 00:00:00 2001 From: MBSingh2038 <60581601+MBSingh2038@users.noreply.github.com> Date: Sat, 28 Sep 2024 17:16:58 -0400 Subject: [PATCH] Update client-a.txt --- client-a.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client-a.txt b/client-a.txt index 09f6cf6..9bd0b94 100644 --- a/client-a.txt +++ b/client-a.txt @@ -2,3 +2,19 @@ # Add your pseudocode to this file below this line: # # ------------------------------------------------- # +START + SET randomNumber = RANDOM(1, 10) + SET attempts = 0 + FOR (attempts = 0; attempts <3; attempts+=1) + { + PRINT "Guess a number between 1 and 10:" + INPUT playerGuess + IF playerGuess == randomNumber: + PRINT "Correct! You win!" + EXIT + ELSE IF playerGuess < randomNumber: + PRINT "Too low!" + ELSE: PRINT "Too high!" + } + PRINT "Game over! The correct number was", randomNumber +END