Answer to Question #320298 in C++ for rhen

Question #320298

4. The cost of an international call from Philippines to Vietnam is calculated as follows:

Connection Fee. $l.50: $2.00 for first minutes; and $0.05 for each additional minute.

Write a program that prompts the user to enter the of minutes the call lasted and

outputs the amount due. Convert also the amount due in dollar to the currency of Vietnam

(Dong)

Conversion Factor: $1.00-19,000.00



1
Expert's answer
2022-03-29T11:40:32-0400
#include<iostream>

using namespace std;

int main()
{
	float connFee = 1.5;
	float firsmin = 2;
	float addmin = 0.05;
	float Dong = 19000;
	float minutes;
	cout << "Please, enter the minutes the call lasted: ";
	cin >> minutes;
	cout << "The amount due is "
		<< (connFee + firsmin + (minutes - 1)*addmin) * 19000
		<< " Dong";
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog