Question
Write a c++ program that will generate some 3-digit daily lottery numbers. Your program should: * Ask the user how many lottery numbers they want
Write a c++ program that will generate some 3-digit daily lottery numbers. Your program should:
* Ask the user how many lottery numbers they want to generate. Check that the input is between 1 and 366.
* Generate that many numbers in the range [0..999] and store them to an array. You should get different results each time you run your program.
* Send the numbers, one per line, to a data file named "numbers.txt" . Display them so that 3 digits will be displayed for each number. The day number should be printed as shown below.
* For example, if you ran your program and said you wanted 4 lottery numbers, the file might end up looking something like this:
Day #1: 666
Day #2: 332
Day #3: 193
Day #4: 021
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started