Question: Need help creating this program using pointer in c++ Part II - Bonus (50 points) Design a program to calculate the cost of gas for

Need help creating this program using pointer in c++
Part II - Bonus (50 points) Design a program to calculate the

Part II - Bonus (50 points) Design a program to calculate the cost of gas for a trip. The user will be prompted for the cost of a gallon of gas, the number of miles of the trip, and the number of miles per gallon the car gets. The program should use pointers, the address operator, and the dereferencing operator for ALL input, calculations, and output. Enter, compile, link, and execute Lab7GasTrip_firstInitialLastName.cpp The following is a sample output that might appear after running your program. Input by the user is shown in bold. This program calculates the cost of gas for a trip when the user enters the cost of gas, the number of miles, and the number of miles per gallon the vehicle gets. Enter the number of miles in your trip: 890 Enter the mpg your car gets: 23 Enter the cost of gasoline: 1.79 Your trip will cost $68.02 Hint: the trip cost = cost of gasoline (number of miles/ mpg your car gets)

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 Programming Questions!