I am trying to learn programming. It is a simple question but I can't solve it. Why am I getting an error? What's wrong? How can I solve this problem? Please help me.
Here is problem definition and my code:
#include<stdio.h>
void calculateCharged(int c) {
int a;
int hours = scanf("%d", &a);
int totalFee = 25;
}
int main(void) {
int i;
int b;
printf("Please Enter Number of Cars ");
scanf("%d", &i);
for (b = 0; b < i; b++) {
calculateCharged(hours)
if (hours)<8
totalFee += hours * 0, 5
else if hours < 24
int additionalHours = hours - 7
totalFee += additionalHours * 5
totalFee += hours * 0, 5
else
int days = hours / 24
int extraHours = hours % 24
totalFee += days * 50
totalFee += days * 24 * 0, 5
totalFee += extraHours * 5
totalFee += extraHours * 0, 5
}
}