Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help creating this program, using pointers. Thanks you for you time, will leave you a rating Part Il- Bonus (50 points) Design a
I need help creating this program, using pointers. Thanks you for you time, will leave you a rating
Part Il- 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_firstlnitialLastName.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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started