Question: 1 Arrays: A lottery program input checking. Write a functions that asks the user to input 6 numbers between 1..59 (including 1 and 59). Put
1 Arrays: A lottery program input checking.
Write a functions that asks the user to input 6 numbers between 1..59 (including 1 and 59). Put them into an array called user. If the user tries to enter an invalid number (less than 1 or more than 59) or a number that is in the array already, do not add it in the array. Instead, ask the user to enter a number again. The function should have the "user" array as a parameter. Call the function in main().
Example:
Please enter a number between 1..59, pos 0 25 Please enter a number between 1..59, pos 1 25 Please enter a number between 1..59, pos 1 10 Please enter a number between 1..59, pos 2 99 Please enter a number between 1..59, pos 2
Note I need this solved as fast as possible and i need it in C++ coding
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
