Details of this Paper

5)Loterry: Write a program that simulates a lotte...




5)Loterry: Write a program that simulates a lottery. The program should havean array of five integers named winningDigits, and should generate a random number in the range of 0 through 9 for each element in the array. The program should ask the user to enter five digits which should be stored in an second integer array named player. The program is to compare the corresponding elements in the two arrays and keep a count of the digits that match. For example, the following shows the winningDigits array and the Player array with sample numbers stored in each. There are two matching digits (elements 2 and 4). lottery array: 7,4,9,1,3 user array: 4,2,9,7,3 Once the user has entered a set of number, the program should display the winning digits and the player's digits and tell how many digits matched. Input Validation: Do not accept player inputs less than 0 or greater than 9.,Please utilize the attached outline to complete the work.,** NOTE: THIS IS IN A C++ ENVIRONMENT **,I really really appreciate your prompt answer Michael l.


Paper#12968 | Written in 18-Jul-2015

Price : $25