int main(void){
int num_passengers;
float distance, fare, distancecharge, passengercharge, airportsurcharge;
char airportride;
printf("Cab fare calculator program: modified by Steve Walker");
printf("\nEnter number of passengers: ");
scanf("%i", &num_passengers);
printf("Enter distance measured by tenth of mile: ");
scanf("%f", &distance);
printf("Going to the airport Y/N");
scanf(" %c", &airportride);
distancecharge = distance * 1.8;
if(num_passengers == 1);
passengercharge = 0;
if (num_passengers == 2);
passengercharge = 1;
if (num_passengers > 2);
passengercharge = 1 +(.5 * num_passengers -1);
if (airportride == 'Y')
airportsurcharge = 2;
else
airportsurcharge = 0;
if (fare < 5);
fare = 5;
printf("\nEnter your distance charge for this ride is $%.2f\n,airportsurcharge");
printf("Your passenger charge for this ride is $%.2f\n, passengercharge");
printf("Your airport surcharge for this ride is $%.2f\n");
printf("Your total fare for this ride is $%.2f");
fare;
printf("Have a nice day");
return 0;
}
the code above seems to be correct except it is not setting the value for the last question and jumps to the end without any values