int main()
{
int startTime,endTime,weekday,weekend,hrs,min,minutes;
double cost;
char first, second, choice;
do
{
do
{
cout<<"When did the call start?\n";
cout<<"Please enter the time in 24-hour notation.\n";
cin>>startTime;
cout<<"How long did the call last?\n";
cin>>minutes;
cout<<"Please enter the first two letters of the day of the call.\n";
cin>>first>>second;
} while ((((first!='M')||(first!='m'))&&((second!='O')||(second!='o'))) || (((first!='T')||(first!='t'))&&((second!='U')||(second!='u'))) || (((first!='W')||(first!='w'))&&((second!='E')||(second!='e'))) || (((first!='T')||(first!='t'))&&((second!='H')||(second!='h'))) || (((first!='F')||(first!='f'))&&((second!='R')||(second!='r'))) || (((first!='S')||(first!='s'))&&((second!='A')||(second!='a'))) || (((first!='S')||(first!='s'))&&((second!='U')||(second!='u'))));
if ((first=='M')||(first=='m')||(first=='T')||(first=='t')||(first=='W')||(first=='w')||(first=='T')||(first=='t')||(first=='F')||(first=='f'))
{
if ((startTime>=800)&&(startTime<=1800))
cost=minutes*.40;
else
cost=minutes*.25;
}
else
cost=minutes*0.15;
cout<<"The cost of the call is "<<cost<<".\n";
cout<<endl;
cout<<"Do you want to rerun the program? Y or N\n";
cin>>choice;
cout<<endl;
}while ((choice=='Y')||(choice=='y'));