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

 Write a C/C+ program that uses a random number generator to

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 2 matches 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, L1-L3 (these are char type variables) then convert the letter guesses to assai 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!