this is an array question we were asked to fiddle with and figure out in our spare time he said he will give the solution monday but I cant wait because ive been struggling with arrays and want to try and understand this if any one can help me please.
Given the following 3 array definitions:
int lotto7 = 3, 19, 4, 20, 21, 41, 26;
int lotto_plus1 7 = 13, 11, 14, 33, 21, 36, 17;
int lotto_plus2 7 = 40, 17, 14, 21, 35, 32, 30;
You are required to write a program to ask the user to enter in their 6 lotto numbers.
The program is to check the results for each of the 3 arrays above. The 7th number is the bonus number in each of the arrays above.
Check the user numbers against each of the lotto arrays to see if the users has won any prizes:
Winning combinations:- Match all 6 numbers with user numbers – wins jackpot
-Match any 5 numbers with any 5 user numbers – wins cash prize
-Match any 4 numbers with any 4 user numbers – wins cash prize
-Match any 5 numbers and the bonus number with 6 user numbers – wins cash prize
-Match any 4 numbers and the bonus number with any 5 user numbers – wins cash prize
-Match any 3 numbers and bonus number with any 4 user numbers – wins a cash prize
- Match any 3 numbers wins lottery scratch card
- None of the above - not a winner
The program is to display the results of each lotto array check to the user.