Answer to Question #159037 in C for Arslan habib

Question #159037

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-30T06:38:11-0500


#include<iostream>
using namespace std;
void display(){
cout<<"TOTAL MILES PER DAY"<<endl;
int miles;
cin>>miles;
cout<<"enter fuel"<<endl;
int fuel;
cin>>fuel;
cout<<"Enter parking fee"<<endl;
double fees;
cin>>fees;
cout<<"Average miles per gallion day "<<miles/fuel<<endl;

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





}

int main(){

display();

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