![]() |
Example 17We'll extend the idea now so that one user types in a number and the other person tries to guess it... 1. Design a Solution Here's our design for the guessing game. 1. get number from player 1
Step 1 becomes: 1.1 prompt player 1 for number
Step 2 becomes: 2.1 repeat
So the complete design is:
|
1.1 prompt player 1 for number
2.1 repeat
3 print message |
2. Code the Program
|
© 1998 John Brewer |