Having Trouble With Work

I have no clue on how I should code this problem. The cost of an international call from New York to Beijing is calculated as follows: Connection fee, $1.99, $2.00 for the first three minutes; and $0.45 for each additional minute. Write a program that prompts the user to enter the number of minutes the call lasted and outputs the amount due. Format output with two decimal places.

Last edited on
amountDue = 3.99 //1.99 + 2.00
if (minutes == 3)
cout << amountDue
else
{
minutes -= 3;
extraFee = minutes * .45;
amountDue += extraFee;
cout << amountDue

Don't forget to #include <iomanip>
and
cout << fixed << showpoint << setprecision(2);

If you need more help let me know :)
Topic archived. No new replies allowed.