C Programming Codes for Getting the Octane Level of the User Location
I need to make a program using C Programming that will get the standard input of the user's location and establish the cost of the octane level of the given location.
This program should contain three functions. The first one is to behaviorally ask and read the location of the user which will pass to the next function that will conclude the prices of each given level. And then, all the information should be printed in horizontal form.
Assuming that the usual gas tank holds 15 gallons and the rate for each user's locations are:
                        Regular         High Level         Super Level
City                  1.254              1.309                     1.399
District            1.139              1.179                     1.279
It should have an output like this:
Enter Location / District: (User will enter the City)
The average prices for the inputted city are:
Regular                High Level                   Super Level
$18.81Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $19.64Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $20.99
I hope you can provide the codes for this.
Thanks in advance.