Write an algorithm + a program in C that will allow us to play the “LOTTO GAME”. For the purpose of the presentation of the assignment, you must...

How It Works

Get an answer in three easy steps. Here's how it works...

Ask Your Question

1. Ask Your Question

Enter your programming question at the top of this page and click Get An Answer.

Pick Your Priority

2. Pick Your Priority

Tell us how quickly you want your programming question answered.

Get An Answer

3. Get An Answer

Connect with your programmer via online chat or telephone call.

Answer

Customer

Write an algorithm + a program in C that will allow us to play the “LOTTO
GAME”. For the purpose of the presentation of the assignment, you must be
able to show some winning outcomes (i.e. no randomness).
Every Saturday a draw is organized on TV. The “LOTTO GAME” is played as
follows:
Six numbers between 1 and 40 inclusive are generated at random. If a number
has been generated it is not generated a second time. A player can bet any six
numbers between 1 and 40 inclusive. The cost for each bet is MRs 20. A player
can bet as many times as he wishes for each draw. If the player gets all the six
numbers correct (the order is not important) he wins the jackpot. If more than one
player wins the six correct numbers the jackpot is shared equally among them.
The program should be able to record all the players, their bet and the total bet.
For five, four and three correct (again order is not important) betting consolation
prizes are awarded. Obviously as the number of correct numbers decreases the
number of potential winners increases and the prizes decrease also. You should
make use of functions in your program.
Each time the game is played a completely new and random set of six
numbers between 1 and 40 inclusive are generated.

Posted

quoteTestimonialsquote

About ExpertHelp

ExpertHelp is changing the way you connect with service professionals.

Whether you have a quick question while preparing your taxes, troubleshooting a computer problem, or need to hire an attorney, ExpertHelp is the most convenient and affordable way to connect with the right service professional to get the job done.

ExpertHelp has been in business since 2011, is an A+ Rated Better Business Bureau accredited member, and offers a 100% satisfaction guarantee on every question you ask!

More Programming Questions...

Ask Your Programming Question & Get An Answer Now!