#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
char fare;
char choice='Y';
int hrIn, minIn, hrOut, minOut;
int hours;
int minutes;
int total_minutes;
double cost;
float charge;
while(choice=='Y'||choice=='y')
{
cout << "\nThis program will calculate a group "
<< "\nfare amount which is then owed by the customer for the trip.\n"
<< "\nTo calculate a group fare amount, input G (or g)"
<< " \n\nInput G: ";
cin >> fare;
if(fare=='G'||fare=='g'){
cout << "\nWhat hour did they depart? ";
cin >> hrOut;
cout << "\nWhat minute did they depart? ";
cin >> minOut;
cout << "\nYou entered for departure: " << hrOut << ":" << minOut << endl;
cout << "\nWhat hour did they arrive? ";
cin >> hrIn;
cout << "\nWhat minute did they arrive? ";
cin >> minIn;
cout << "\nYou entered for arrival: " << hrIn << ":" << minIn << "\n" << endl;
cout << "A rickshaw departed at " << hrOut << ":" << minOut
<< " and arrived at " << hrIn << ":" << minIn << " with a group of customers.\n" << endl;
if(hrIn >= hrOut && minIn >= minOut){
hours = (hrIn - hrOut);
cout << "You arrived in " << hours << " hour(s)";
minutes = minIn - minOut;
cout << " and " << minutes << " minute(s) ";
total_minutes = (hours * 60) + minutes;
cout << ", or in a total of " << total_minutes << " minutes.\n" << endl;
}
else{
hours = (hrIn - hrOut-1);
cout << "You arrived in " << hours << " hour(s)";
minutes = minIn - minOut+60;
cout << " and " << minutes << " minute(s) ";
total_minutes = (hours * 60) + minutes;
cout << ", or in a total of " << total_minutes << " minutes.\n" << endl;
}
if(total_minutes <=15){
charge = 16.00;
cout << "You owe $" << charge << " dollars.\n" << endl;
}
if(total_minutes > 30){
charge = 16.00 + (((total_minutes) - 15) * 4.00) + 50;
cout << "You owe an additional amount of $50.00 for exceeding 30 minutes,"
<< "\nwhich brings your total amount to $" << charge << " dollars.\n" << endl;
}
if{15 < Total_minutes <= 30){
charge = 16.00 + (((total_minutes) - 15) * 4.00);
cout << "You owe $" << charge << " dollars.\n" << endl;
}
//------------------------------------…
else
cout << "\nThe character that you have entered is invalid. Please try again.\n" << endl;
cout << "Would you like to perform another calculation (Y/N)? ";
cin >> choice;
}
cout << "\nThank you for using the ODUSPORTS calculator!\n" << endl;
system("pause");
return 0;
}
I am getting the expected `(' before '{' token around line 75 and 76. I need help with this so that I can compile and run my program.
Line 75 starts at:
if{15 < Total_minutes <= 30){