I'm having problems finishing my program, it keeps giving me the error '=':function as left operand. And im not sure what that means. It is supposed to be a function to calculate basic car rental prices. This piece of the program is where it is telling me its wrong. Im not sure how to fix it though. Any help would be excellent.
Code:
switch(car_type) { case 1: cost=29.90; extra=0.29; total=total(cost,days_rented,km_traveled,extra); break; case 2: cost=39.95; extra=0.39; total=total(cost,days_rented,km_traveled,extra); break; case 3: cost=49.95; extra=0.49; total=total(cost,days_rented,km_traveled,extra); break; case 4: cost=59.95; extra=0.59; total=total(cost,days_rented,km_traveled,extra); break; }
Comment