Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help making this program in programming c can you make sure to comment adequately to have all 7 functions like stated. will give

i need help making this program in programming c
can you make sure to comment adequately
to have all 7 functions like stated. will give a thumbs up if answer image text in transcribed
image text in transcribed
You will write a program that will Calculate some of the costs for a road trip. .Assume the user will drive an average of 70 MPHH . The toll rate is 5 cents a mile .The user will stop and spend S15.00 every 4 hours for food and/or coffee The user will enter the number of miles, the cost of gas per gallon, and the miles per gallon(mpg) of the car You must have at least 7 user defined functions as follows: //Road trip //preprocessor directives #defineCRTSECURE NO WARNINGS #include - - #define SPEEDLIMIT 78 #define TOLLRATE "es #define ENERGYCOST 15.ee //Greet the user void Greeting) //Calculations for one road trip void OneRoadTrip); //get input (y or n) to continue void GetYesorNo(char *inputPtr); //Calculate the cost of the gas void CalculateGasCost (double miles, double 'gasCostPtr); //calculate the time in hours and minutes void CalculateTime(double miles, double *tripTinePtr, nt *hoursPtr, int *minutesPtr); //calculate the cost of food/energy void CalculateEnergyCost(double tripTime, double foodCostPtr); //calculate cost of tolls and return the total cost of gas, tolls, and food double CalculateCost (double miles, double gasCost, double foodCost, double tollCostPtr); Use function prototypes. Write comments for each function that will appear in the file before each prototype and again before each function definition. . . Be sure to comment your code adequately .Be sure to indent properly. Check your textbook examples to see how it should be done . Use meaningful variable names. NO Late Submission

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

1. Describe the major goals of a feasibility report.

Answered: 1 week ago