Question
Programing Language: C++ In the 1850's, the hottest new technology was the telegraph. Messages or telegrams could be sent via electrical forces traveling through a
Programing Language: C++
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.
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.
Sample Output the name of the customer: Larry Smith Enter street address: 122 Main Street Enter city: Charlotte Enter state: NC Enter zip code: 23499 Enter the number of words sent: 157 Larry Smith 122 Main Street Charlotte, NC 23499 Amount owed: $47.50 Enter the amount received from customer: 5000 Number enomination Dollars Quarters Dimes Nickels PenniesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started