Hello everybody, I'm having a problem with my conpiler.
Below is what I typed but it is giving me
Can anybody help me?
7 parse error before `float'
10 `fltMoney' undeclared (first use this function)
10 (Each undeclared identifier is reported only once for each function it appears in.)
13 parse error before `>'
16 parse error before `>'
19 parse error before `>'
22 parse error before `>'
25 parse error before `>'
28 parse error before `>'
15 warning: unreachable code at beginning of switch statement
38 parse error before `return'
//Bonus
#include<iostream.h>
#include<stdlib.h>
int main()
{
float fltBonus
float fltMoney
int i;
cout <<"Input amount collected ";
cin >> fltMoney;
switch(fltMoney)
{
case > 500.0:
fltBonus = 0.1 * fltMoney;
break;
case > 400.0:
fltBonus = 0.09 * fltMoney;
break;
case > 300.0:
fltBonus = 0.08 * fltMoney;
break;
case > 200.0:
fltBonus = 0.07 * fltMoney;
break;
case > 100.0:
fltBonus = 0.06 * fltMoney;
break;
case > 50.0:
fltBonus = 0.02 * fltMoney
break;
default:
fltBonus = 0;
break;
}
cout << "\nBonus received" << fltBonus;
cout <<endl;
system ("PAUSE")
return 0;
}