how??

Problem : The cost of long distance call is based on its destination and time of the day call was made, as well as the duration of the call. The rates are as follows :

1 - DAYTIME
Destination Code Destination Rate
1 American Region P 50.00 every 3 minutes.
2 Asian Region P 30.00 every 2 minutes.
3 African Region P 40.00 every 3 minutes.
4 European Region P 35.00 every 2 minutes.
2 - NIGHTTIME
Destination Code Destination Rate
1 American Region P 47.00 every 3 minutes.
2 Asian Region P 27.00 every 2 minutes.
3 African Region P 36.00 every 3 minutes.
4 European Region P 30.00 every 2 minutes.

Create a program that will compute for the charge of the long distance call. Input the destination and time of the day call was made, as well as the duration of the call. Follow the sample output required below.

SAMPLE OUTPUT
Enter Destination Code [1-4] : 2
Enter Time Code [1][2] : 1
Duration of the Call : 39

Destination : Asian Region
Time of Call : Daytime Call
Charge is : 585.00
and what is your c++ question?
Thanks for Furry Guy for this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <cctype>
#include <limits>

int main()
{
   std::cout << "Do you want someone to do all the work for you? ";
   char answer { };
   std::cin >> answer;

   std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');

   if (::toupper(answer) == 'Y' ) { std::cout << "Post it in the Jobs section.\n"; }

   else { std::cout << "Show what you have coded so far.\n"; }

   std::cout << "Good luck.\n";
}

Topic archived. No new replies allowed.