Name:
PART II: USE THE COMPUTER
Problem5t (40points)
In a lottery game, the player is asked to enter 5 positive integers. The winning prize depends on
the ratio of the highest number (Max) to the lowest numbers (Min) entered by the player.
• If the remainder of the ratio (Max/Min) is odd, the winning prize is 2,000 dollars.
• If the remainder of the ratio (Max/Min) is even, the winning prize is 1,000 dollars.
• In all other cases, the winning prize is 500 dollars.
1) Please write a C++ program to design the game and answer the question below after entering
the following numbers: 1 7 3 78 67.
a) The minimum value (10 points)
b) The maximum value (10 points)
c) The remainder of the ratio (Max/Min) (5 points)
2) Test your program with 5 different integers of your choice. (10 points)
3) Make your program calculate the value of variable $c = \sqrt{Max^2 + Min^2}$ with the integers
that you entered in question 3); and display your answer with 5 significant digits. (5 points).
Please email your program to mkoffi@hostos.cuny.edu