#include <iostream>using namespace stdint main(){string weekday;string weekend;string day = weekday || weekend;int time;int length;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;int rate;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 = rate*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);}
Ok after looking at it a bit, I think that everything except the "Do you have another y/n?" and the "Total cost $" part are right. Now for the y/n part, how would I word that in order to get back into the loop? Would I have to move it inside of the loop or is it fine there? And for total cost would I have to assign its own int or what operation would I need to use?