initialize() that takes array wins[] as parameter and assigns -1 to each element of the array.
check() that takesa number and the array wins[] as parameters and returns true if the number matches one of the elements in the array, or false if none of the elements do. You may assume that the number check() is looking for a function check() to make sure that the new number is not already in the array.
entry() that asks the user to enter a single number from 0 to 99 and returns this value.
printOut() that ouputs the selected numbers and user input.
and finally: the pseudo code for the main function:
main(){
declare array and other variables
initialize(..) // Fill array with -1
draw(..) //Select 10 non-repeating random numbers.
entry(...) //get user input.
use check() to compare the user input against lottery numbers and output whether user won
printOut(..) //Outputs selected numbers
}
Please enter a number from 0 to 99:
1
You won!
Here are the lottery numbers:
12
1
9
98
96
27
58
82
86
90
Please enter a number from 0 to 99:
5
You did not win.
Here are the lottery numbers:
58
10
53
77
49
51
29
28
30
74
Please enter a number from 0 to 99: