Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that calculates potential savings when you switch driving from a gasoline-powered car to an electric vehicle (EV). The program takes the following
Write a program that calculates potential savings when you switch driving from a gasoline-powered car to an electric vehicle (EV). The program takes the following inputs from the user Local fuel price/gallon, Estimated MPG of gas vehicle, Estimated kWh per mile for EV, Utility kWh rate, Total miles are driven per year, and displays the potential total $ savings per year.
The formula of savings is [ (total miles driven / MPG) x gas price per gallon ] - [ (total miles driven x EV kWh consumption per miles) x utility rate per kWh] .
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