#include <iostream>using namespace stdint main(){string day;int time;int length;int rate;string weekday = "weekday";string weekend = "weekend";cout << "Enter the day weekday or weekend \n";cin >> day;cout << "Enter the time the call started \n";cin >> time;cout << "Enter the length of the call \n";cin >> length;cout.setf(ios::fixed);cout << setprecision(2);if (time > 800 && time < 1800 && day == weekday) { rate = 20; }else if (time > 1800 && time < 2300 && day == weekday) { rate = 15; }else if (time > 2300 && time < 800 && day == weekend) { rate = 10; }int cost;int cost = (rate/100)*length;cout << day << length << "minute call started at " << time << "hrs will cost $" << cost << endl;//Do you have another y/n?//cout << "Total cost $ ";return(0);}
Also how would I go about doing the y/n and total cost part? Those were the only two parts I had no idea about.