CIS 1111 Programming Topic 5 – Tips and Pennies Program

CIS 1111 Programming Topic 5 – Tips and Pennies Program

Description: This is a 2-part program. In this assignment, you will develop a C++ program that calculates your bank deposit and converts a number of pennies into the least amount of coinage. Develop a Raptor program for Part 1 only.
• Part 1: You are a server in a restaurant and you want to calculate your total tips for the night. You will enter the number of dollars, quarters, dimes, nickels, and pennies you have received in order to calculate the total deposit.
• Part 2: You found a stash of pennies and you want to turn them in for the least amount of coinage. For example if you have 131 pennies, you will get 1 dollar bill, 1 quarter, 1 nickel, and 1 penny.
Requirements:

1. Output must be labeled and easy to read as shown in the sample below.
2. Program must be self-documenting with comments and meaningful variables names.

Part 1 Requirements:
1. Use cout to prompt the user to enter his/her name.(put” Sura Hameed “for the name and for the account name too)
2. Use getline to input the user’s name.
3. Use cout to prompt the user for input and cin to input the number of dollars, quarters, dimes, nickels and pennies you received as tips.
4. Store the input in variables of the appropriate data type. Use additional variables to hold subtotals and total.
5. Output the name, number of dollars, quarters, dimes, nickels, and pennies entered.
6. Calculate the total deposit
7. Use cout to display the total tips.
8. Flowchart Part 1 in Raptor.

Part 2 Requirements:
1. Enter the number of pennies in your piggy bank.
2. Use variables to hold the number of dollars, quarters, dimes, nickels, and pennies.
3. Display the number of pennies the program started with and the number dollars, quarters, dimes, nickels, and pennies you will get back.

Hints for Part 2:
• Start by first calculating the number of dollars you can covert the pennies to by dividing by 100.
• Use the modulus (%) 100 to find the remainder.
• The remainder will be the remaining pennies after the dollars were converted.
• Then do the first two steps again but dividing by 25 and then by 10 and then by 5.