Assume that gambling Greg often goes to the Dog Racing Track. Greg loves to bet on the puppies. In each race Greg will place a wager and pick a dog.  The dog information will be stored in a structure name DOG as follows: Name, amount to pay out if Greg wins, and the odds of this dog winning the race. The program should have the following menu: [G]amble [R]esults of All Races [L]eave the Dog Track   If Greg selects [G] the program will ask Greg for his wager and allow Greg to pick a dog from a list. The program will then run the race. The result will be shown to Greg. The results of the race will be stored for future use. If Greg selects [R] the program will show Greg the results of all previous races entered during this run of the program. If Greg selects [L] the program will end. The dogs: You will create 9 different dogs.  See below: Dog Name Payout Odds of Winning You name the dogs 2 to 1 40%   5 to 1 10%   10 to 1 8%   15 to 1 6%   50 to 1 1%   20 to 1 4%   10 to 1 8%   5 to 1 10%   3 to 1 13%

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

Create the following program in C

Assume that gambling Greg often goes to the Dog Racing Track. Greg loves to bet on the puppies. In each race Greg will place a wager and pick a dog.  The dog information will be stored in a structure name DOG as follows:

Name, amount to pay out if Greg wins, and the odds of this dog winning the race.

The program should have the following menu:

[G]amble

[R]esults of All Races

[L]eave the Dog Track

 

If Greg selects [G] the program will ask Greg for his wager and allow Greg to pick a dog from a list. The program will then run the race. The result will be shown to Greg. The results of the race will be stored for future use.

If Greg selects [R] the program will show Greg the results of all previous races entered during this run of the program.

If Greg selects [L] the program will end.

The dogs:

You will create 9 different dogs.  See below:

Dog Name

Payout

Odds of Winning

You name the dogs

2 to 1

40%

 

5 to 1

10%

 

10 to 1

8%

 

15 to 1

6%

 

50 to 1

1%

 

20 to 1

4%

 

10 to 1

8%

 

5 to 1

10%

 

3 to 1

13%

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning