Programming Logic and Design, 6e
battingAvg = numOfHits / numOfAtBats
Find the Bugs
10. Your student disk contains files named DEBUG02-01.txt, DEBUG02-02.txt, and
DEBUG02-03.txt. Each file starts with some comments that describe the problem.
Comments are lines that begin with two slashes (//). Following the comments, each
file contains pseudocode that has one or more bugs you must find and correct.
Please see the DEBUG02-01.txt, DEBUG02-02.txt, and DEBUG02-03.txt solution
11. Create a flowchart or pseudocode that shows the logic for a program that generates a
random number, then asks the user to think of a number between 1 and 10. Then
display the randomly generated number so the user can see whether his or her guess
was accurate. (In future chapters you will improve this game so that the user can enter
a guess and the program can determine whether the user was correct.)