Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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 Pennies

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions