output Enter account number or QUIT to quit input acctNum return finish output

# Output enter account number or quit to quit input

• Homework Help
• 53
• 95% (221) 210 out of 221 people found this document helpful

This preview shows page 44 - 51 out of 53 pages.

2.Your downloadable files for Chapter 5 include a file named DEBUG05-04.jpg that contains a flowchart with syntax and/or logical errors. Examine the flowchart and then find and correct all the bugs.
Programming Logic and Design, 8e Solutions 5-45
Programming Logic and Design, 8e Solutions 5-46 Game Zone 1.In Chapter 2, you learned that in many programming languages you can generate a random number between 1 and a limiting value named LIMITby using a statement similar to randomNumber = random(LIMIT). In Chapter 4, you created the logic for a guessing game in which the application generates a random number and the player tries to guess it. Now, create the guessing game itself. After each guess, display a message indicating whether the player’s guess was correct, too high, or too low. When the player eventually guesses the correct number, display a count of the number of guesses that were required.
Programming Logic and Design, 8e Solutions 5-47 Pseudocode: start Declarations num myRandomNumber num guess num count num LIMIT string PROMPT = “Enter a number between 1 and ” string CORRECT = “You guessed correctly!” string HIGH = “You guessed too high!” string LOW = “You guessed too low!” housekeeping() while guess not equal to myRandomNumber detailLoop() endwhile finishUp() stop housekeeping() myRandomNumber = random(LIMIT) output PROMPT, LIMIT input guess
2.Create the logic for a game that simulates rolling two dice by generating two numbersbetween 1 and 6 inclusive. The player chooses a number between 2 and 12 (the
Programming Logic and Design, 8e Solutions 5-49 Pseudocode: start Declarations num dice1 num dice2
Programming Logic and Design, 8e