Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C . Program - ( 1 0 pt ) Write a program that you enter the start time of a phone call using a floating

C. Program -(10pt)
Write a program that you enter the start time of a phone call using a floating point value such that 7:15 am would be 7.15 and 7:15 pm would be 19.15
Also the number of minutes the call lasted (do not allow negative values) presume whole minutes are used
There are three rates charged
Before 7:00am $0.15 per minute
Between 7:00 am and 7:00 pm $0.25 per minute
After 7:00pm until midnight $0.20 per minute
The charges are only based on the start time not how long or when it ends
From the example note that valid minutes and start times must be entered
Example Output
Phone Charges Calculator
Using a floating point such that 4:45pm would be entered as 16.45
What time did the phone call start? 25.15
That is not a valid time please re-enter
What time did the phone call start? 15.75
That is not a valid time please re-enter
What time did the phone call start? 6.55
How many total minutes did the call last? -3
Invalid number of minutes
How many total minutes did the call last? 14
The phone call started at 6:55 and was 14 minutes
using a rate of $0.15 per minute cost was $2.10 in c++
image text in transcribed

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

Step: 3

blur-text-image

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

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions