Hi I am new to C++ and I am stuck on this assignment so I need help
Write a program which uses functions to compute some information about a car trip:
Function intro will print your name, your course (CP1) and (Duke), Exercise 3, and a brief (one line) description of the program.
Function mpg will have two parameters: the number of miles driven (an int) and the gallons of gas used (a float). The function will compute and return the miles driven per gallon of gas used (a float). This function doesn't print anything.
Function tripcost will have three parameters: the cost of a gallon of gas (a float), the gallons of gas used (a float), and the cost of tolls (a float). The function will compute and return the total cost of the trip (a float). This function doesn't print anything.
Function main will:
1)Call function intro.
2)Prompt the user for the number of miles driven and the gallons of gas used.
3)Call function mpg and pass these values to it. After the call, print a message giving the miles per gallon used on the trip.
4)Prompt the user for the cost of a gallon of gas, and the cost of tolls for the trip.
5)Call function tripcost and pass the cost of a gallon, the cost of tolls, and the gallons of gas used to the function. After the call, print a message giving the total cost of the trip.
What are you having trouble with? Note that we aren't a do-your-homework-for-you site, but we can help with specific questions.
Break the assignment down into bite-sized parts.
The first task talks about a function called "intro".
Do you know how to define a function? If not, go to: http://www.cplusplus.com/doc/tutorial/functions/