Question: Write a program that: the file contains a name of a city (destination) and the distance in miles for a group of 3 different routes.

Write a program that:

the file contains a name of a city (destination) and the distance in miles for a group of 3 different routes. (

ORLANDO 500 450 470 TAMPA 570 600 540 JACKSONVILLE 750 670 710 ) 

Then ask the user for a car's miles/gallon and gas dollars/gallon (both doubles) as input

Finally your program must print in the screen the gas cost for all the cities and all the routes.

You must create a function to calculate the gas cost!!!

In C program please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!