Once again, my C++ program is compiling correctly, but the last else statement is not calculating correctly. For 11 or more registrants, the fee per person is $60. (I'm supposed to calculate 20 registrants for this test case.)
Here's my code:
#include<iostream>
using namespace std;
int main ()
{
int registrants = 0;
double total = 0.0;
cout << "Enter the number of group registrants: ";
cin >> registrants;
if (registrants <= 5)
total = 100 * registrants;
else if (registrants > 5 < 11)
total = 80 * registrants;
else
total = 60 * registrants;
{
cout << "Your total fee for the group is: $" << total << endl;
}
system ("pause");
return 0;
}