Question: For this exercise, you need to compute the shared cash prize when given a total prize pool and the number of winners. Your program is

 For this exercise, you need to compute the shared cash prizewhen given a total prize pool and the number of winners. Your

For this exercise, you need to compute the shared cash prize when given a total prize pool and the number of winners. Your program is going to be used by the New Zealand Lotteries Commission to compute how much each Lotto player should win when the total prize pool and the number ofwinners is known. The total prize pool should be divided evenly amongst the winners. The output of your program should be a dollar value expressed to 2 decimal places. The example below illustrates how your program should work in the case that there are 3 winners sharing a total of $1001. The example shows how the prompts and the output for your program must be formatted {user input is shown in red and bold]: Total: 1061 winners: 3 Shared: $333.67 N otes: - there should be a newline printed after each prompt to the user {i.e. after "Total:" and "Winners'.") 0 both the cash total and the number of winners are entered as whole numbers a you can assume there will be at least one winner! a the output. which displays the shared prize per winner, must show exactly 2 decimal places and display the currency symbol (Le. dollar sign] For example: Input Result 1991 Total: 3 winners: Shared: $333.5? 1989669 Total: 4 winners: Shared: $256699.69

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 Programming Questions!