6.1.1. Guessing a random number |
1. phase
Guess the number is entered into the program from a random number generator in a computer.
2. phase
Generated number should be in the range 0<X<1000.
3. phase
A random number in the range 0<RND<1 where:
Enter the number of the users (variable 'No') and make comparisons and actions by:
a.) No<X ==> Asked to enter larger number (Message 1.)
b.) No>X ==> Asked to enter smaller number (Message 2.)
c.) No=X ==> Report the number hit by and greeting card (Message 3.)
d.) Request for re-operation of the program.
4. phase
Flowchart:
|
Citing of this page: Radic, Drago. " Informatics Alphabet " Split-Croatia. {Date of access}; https://informatics.buzdo.com/file. Copyright © by Drago Radic. All rights reserved. | Disclaimer |