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
#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";
}
Comments
Leave a comment