Question: The program is a bit tedious because the answer is hard-coded into the program. Make a version where the user can play repeatedly (without stopping

 The program is a bit tedious because the answer is hard-coded

The program is a bit tedious because the answer is hard-coded into the program. Make a version where the user can play repeatedly (without stopping and restarting the program) and each game has a new set of digits. You can get four random digits by calling the random number generator randint(10) from std lib facilitie.h four times. You will note that if you run that program repeatedly, it will pick the same sequence of four digits each time you start the program. To avoid that, ask the user to enter a number (any number) and call seed randint(n), also from std_lib_facilities.h, where n is the number the user entered before calling randint(10). Such an n is called a seed, and different seeds give different sequences of random numbers

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!