Question
What wrong with this code? How do I fix TimeStarted variable? C++ #include #include using namespace std; int main(int argc, char* argv[]) { const double
What wrong with this code? How do I fix "TimeStarted" variable? C++
#include
cout << "Enter the time started (ex: 14:35):"; cin >> hour >> separator >> minute;
cout << "Enter the length of the call in minutes: "; cin >> LengthOfCall;
if (day1 == 'S' && day2 == 'A') billingRate = WEEKEND_RATE; else if (day1 == 'S' && day2 == 'U') billingRate = WEEKEND_RATE; else { if (TimeStarted>= 800 && TimeStarted<= 1800) billingRate = DAY_RATE; else billingRate = EVENING_RATE; } CostOfCall = LengthOfCall * billingRate; cout << "Another call (Y/N)?"; cin >> again; again = toupper(again); } while (again == 'Y'); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started