Answer to Question #159912 in C for Osama Ahmed

Question #159912

Create a program that calculates your daily driving cost, so that you can estimate how much money could be saved by carpooling (car-sharing), which also has other advantages such as reducing carbon emissions and reducing traffic congestion. The program should input the following information and display the user’s cost per day of driving to work:

a)     Total miles driven per day.

b)    Cost per gallon of gasoline.

c)     Average miles per gallon.

d)    Parking fees per day.

1
Expert's answer
2021-01-31T08:02:06-0500
#include<iostream>
using namespace std;
void SHOW(){
cout<<"TOTAL MILES"<<endl;
int miles;
cin>>miles;
cout<<"enter fuel IN GALOSINE"<<endl;
int fuel;
cin>>fuel;
cout<<"PUTparking fee"<<endl;
double fees;
cin>>fees;
cout<<"Average miles per gallion IS "<<miles/fuel<<endl;

cout<<"total cost per day "<<miles*fuel+fees<<endl;





}

int main(){

SHOW();

return 0;}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS