Reference no: EM132193783
Question :
Write a C/C+ program that uses a random number generator to create a 1 row, N column vector of random numbers RN[] between min and max, where N, min, max are input by the user.
Then have the user enter 3 lucky number guesses G1-G3 between min and max, and have your program notify the user if none, one, two or three of the guesses match up with any of the N random numbers.
The prizes are $ 100 per one match, $ 1000 for 2matches and $10000 for 3 matches. Test your code for three guesses with N=200, min = 0 and max = 1000.
Repeat the above program for 3 lucky letter guesses, LI-L3 (these are char type variables) then convert the letter guesses to ascii decimal numbers and check if any of the guesses match a RN vector containing 10 random numbers between 26 and 333.
Note the numbers 26 -133 correspond to ASCII code numbers for English alphabet keyboard characters.