// Mileage and cost per trip calculator #include int main(void) { printf ("Enter a distance in kilometers:\n"); double distance; scanf("%lf,&distance"); printf ("Enter the fuel efficiency of the vehicle in kilometers per litre of petrol:\n"); double fuel; scanf("%lf,&fuel"); printf ("Enter the cost of gasoline in cents per :\n"); double gas; scanf ("%lf,&gas"); printf ("The cost of the trip will be $%lf." ,(distance/100.0)*(fuel)*(gas)); system("pause"); return 0; }