Kat H.

asked • 04/05/21

C++. An international phone call is billed by the minute according to this scheme: Calls up to 10 minutes cost a flat $5.

An international phone call is billed by the minute according to this scheme: Calls up to 10 minutes cost a flat $5. Calls over 10 minutes but less than 30 cost $.50 per minute. Calls 30 minutes or longer cost a base of $15.00 plus $.30 per minute over 30.

Write a program to read in the duration of a call as an integer and output the total cost as a decimal. Do not worry about making it look like money.


Code:


#include <iostream>

using namespace std;


int main()

{

//YOUR_CODE

}

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.