I got some working code but I'm getting a syntax error right at the end, any thoughts onw aht could be wrong would be a big help
Thanks,
Extro
Code:
include<stdio.h>
float calculateCharges (float charge);
int main()
{
int stay;
int car = 0;
float charge;
printf("How long did the vehicle stay in the garage?");
scanf("%d" , &stay);
for(car <= 3; stay <= 24; car++) {
if(stay <= 3){
charge = 2.00;
printf("%s%13s%13s\n", "Car", "Hours", "Charge");
printf("%13d%13d%13f\n" ,car, stay, charge);
}
if(stay > 3){
printf("%d%13%13\n," , car, stay , calculateCharges(charge) );
}
if(stay == 24){
charge = 10;
printf("%13d%13d%13f\n" , car, stay, calculateCharges(charge));
}
}
return 0;
}
float calculateCharges (float charge);
{
return stay * 1 / 2;
}