Question: I must write a program that calculates and displays a telegram bill for the user/customer. My textbook is: Starting out with C++: From Control Structures

I must write a program that calculates and displays a telegram bill for the user/customer. My textbook is: Starting out with C++: From Control Structures through Objects 8th ed - Gaddis and this project covers chapters 1, 2, and 3. Here is my HW assignment info:

In the 1850's, the hottest new technology was the telegraph. Messages or telegrams could be sent via electrical forces traveling through a wire. Write a program that will generate a bill for sending a telegram, accept payment and instruct cashier how to give change. The amount owed is based on the number of words sent. Customers are charged at a rate of $1.50 for blocks of 5 words and $0.50 for single words. Your program should calculate the smallest charge possible for the given amount of words sent. Named constants must be used in the calculation.

Instructions:

Prompt user for the customers name, street address, city, state, zip code and number of words sent.

Calculate and display a telegram bill with all information specified in the Sample Output on page 2.

After displaying the telegram bill, prompt user for the amount of money received from the customer. The user should supply the amount given in pennies, for example 275 instead of 2.75.

Calculate the amount of change owed and display the number of dollars, quarters, dimes, nickels, and pennies that the customer should receive.

Your program's output should be formatted in the same manner as the Sample Output on page 2.

Here is the sample output and what should be displayed after the user enters info:

Enter the name of the customer: Joe Shmoe

Enter street address: 123 Main Street

Enter city: New York

Enter state: NY

Enter zip code: 12345

Enter the number of words sent: 157

Joe Shmoe

123 Main Street

New York, NY 12345

Amount Owed: $47.50

Enter the amount received from customer: 5000

Denomination Number

-------------- ---------------

Dollars 2

Quarters 2

Dimes 0

Nickels 0

Pennies 0

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