Having problems with my current program
I'm currently taking a starter-course in programming at college, but its an online class so not much 'help' when you get problems, I've been staring at my code for a long time but can't seem to get this error fixed
Heres my code:
Code:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int registrants = 0;
double totalFee = 0.0;
cout << "Enter number of registrants: ";
cin >> registrants;
if (registrants <= 0)
cout << "Input Error";
else
{
if (registrants >= 1 && registrants <= 5)
totalFee = registrants*100;
cout << "Total fee: " << totalFee << endl;
else <--- Error is here!!!
{
if (registrants >= 6 && registrants <= 10)
totalFee = registrants*80;
cout << "Total fee: " << totalFee << endl;
else
{
totalFee = registrants*60;
cout << "Total fee: " << totalFee << endl;
}
}
}
system("pause");
return 0;
}
I keep getting the 2 same errors "Expected primary-expression before "else" and "Expected ';' before "else" but for every other program I've made for class, it looks just like this and no errors at all. Please help!