Question: Introduction To C++ Programming Write a code on CLion IDE. Reach Out and Touch Someone Objectives: Learn how to use boolean expressions and conditional statements
Introduction To C++ Programming Write a code on CLion IDE. Reach Out and Touch Someone Objectives: Learn how to use boolean expressions and conditional statements (if and switch). Instructions: Assume you work for a long distance telephone company. Your customers have been complaining that they dont understand the formula for the cost of a long distance call. Your boss has asked you to create a program that will allow a customer to obtain a price given that the customer specifies when a call will be made and its duration. You will first give the overall formula to the customer. You will then obtain the day of the week and time that the call originated. Next, you will get the duration of the call. You will calculate and display the price of the call using the formula shown at the beginning of the sample session. If the customer enters any invalid data, then immediately print an appropriate error message and just return. Use the switch statement appropriately at least once. The output does not have to match that exactly given in the sample session below. It should be clear to a customer and provide all of the information that was given. For the final price of the call you must show 2 digits to the right of the decimal point.
The price for a call is calculated as follows: 20 cents a minute. 50% off if originated on weekdays when before 8am or after 5pm. 75% off if originated on weekends. 15% off on any minutes after an hour at the given rate. 7% federal tax. Please enter a number for the appropriate selection at each prompt. Please indicate the day the call originated. Sunday (1), Monday (2), Tuesday (3), Wednesday (4), Thursday (5), Friday (6), Saturday (7) day: 5 Please enter time that call started. hour (0-23): 13 minute (0-59): 42 Please enter the duration of the call. minutes: 10 The price for the long distance call originating on Thursday at 1:42PM is $2.14.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
