Question: c++ The Assignment For this assignment, you will need to write a program to generate a list of 100 lottery tickets and output them to

c++
c++ The Assignment For this assignment, you will need to write a
program to generate a list of 100 "lottery tickets" and output them

The Assignment For this assignment, you will need to write a program to generate a list of 100 "lottery tickets" and output them to the file tickets.txt. A lottery ticket has 5 unique values between the numbers 1 and 12 inclusive. Each ticket does not need to be unique (our program could generate two of the same ticket), but there can be NO duplicate values within the ticket. Valid Ticket Examples: 718412251186121075101111111510223 Invalid Ticket Examples: 7511215151012810511 Program Requirements 1. In main.cpp there is a skeleton for how the program should be written. 2. Seed the random number generation to the value 3 3. You must use the void function FilLTicketUnique to fill the array with 5 random unique values. This function only accepts the array as an argument. 4. You must use the void function Wr iteTicket to output the ticket to 1. In main.cpp there is a skeleton for how the program should be written. 2. Seed the random number generation to the value 3 3. You must use the void function FillTicketUnique to fill the array with 5 random unique values. This function only accepts the array as an argument. 4. You must use the void function Wr iteTicket to output the ticket to the file. This function accepts the output file object and the array as arguments. The output file object should be passed by reference. (Note: You may just want to use std::cout first with this function while testing your logic before changing it to write to the file instead.) 5. Follow our Style Guide. Sample Runs If your program is working correctly, you can use the diff command on UNIX (Linux) to compare your output file with the no_duplicates.txt file that already exists in the repl. Type the following in the shell to see if your output file matches. diff tickets.txt no_duplicates.txt The diff command will compare two files for differences. If you see NO output to the terminal after using diff. Then it was a success! If you see output, double check that you have seeded the random number generator and that there are NO duplicate values within your tickets. If you did both, you're program may still be correct it just depends on the logic you used to generate the random values

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!