I am not sure why I am getting syntax errors in lines 29 and 31. When I run the console my return values are correct, but have syntax errors.
include <iostream>
#include <iomanip>
using std::cout;
using std::cin;
using std::endl;
using std::setprecision;
using std::ios;
using std::setiosflags;
int main()
{
//declare constants and variables
const double COMM_RATE1 = .02;
const double COMM_RATE2 = .05;
int sales = 0;
double commission = 0.0;
//get input item
cout << "Enter the sales amount: ";
cin >> sales;
//calculate commission
switch (sales)
{
case 100000.0 <= : cout << commission = sales * COMM_RATE1 << end1;
break;
case 100000.0 > : cout << commission = sales * COMM_RATE2 << end1;
break;
default: cout << "error" << endl;
//end switch
}
//display commission
cout << setiosflags(ios::fixed) << setprecision(2);
cout << "Commission: $" << commission << endl;
return 0;
} //end of main function