# car-pool saving calculator using c++ application,

Page 1 of 1

## 4 Replies - 3041 Views - Last Post: 11 February 2014 - 06:49 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=339796&amp;s=76af476bb350f567f5e7ae733b6a022f&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 ashafie

Reputation: 0
• Posts: 1
• Joined: 05-February 14

# car-pool saving calculator using c++ application,

Posted 11 February 2014 - 12:11 PM

the application should in put the following:
1total miles driven per day;
2.cost per gallon of gasoline;
3.average miles per gallon
4.parking fees per day
5. tolls per day

Using c++ application create a program that calculate daily driven cost, so that you estimate the how much money could be by car pooling, which also other advantages such as reducing carbone emmisions and reducing traffick

Here is what I was able to do.
```1. // application to calculate pool savings
2 #include <iostream>
3. using namespace std;
4
5. int main()
6{
7double miles, gas, average, parking, tolls, total;
8cout miles;
9cout gas;
10. cout average;
11. cout parking;
12. cout tolls;
13
14 total=(miles*gas)/ (average+parking+tolls)
15. cout
```

This post has been edited by modi123_1: 11 February 2014 - 12:17 PM
Reason for edit:: please use code tags

Is This A Good Question/Topic? 0

## Replies To: car-pool saving calculator using c++ application,

### #2 modi123_1

• Suitor #2

Reputation: 10675
• Posts: 41,554
• Joined: 12-June 08

## Re: car-pool saving calculator using c++ application,

Posted 11 February 2014 - 12:15 PM

Quote

Here is what I was able to do.

Okay, and what's the question?

### #3 Black_Epiphany

Reputation: 9
• Posts: 66
• Joined: 02-February 14

## Re: car-pool saving calculator using c++ application,

Posted 11 February 2014 - 02:12 PM

You'll want to ask the user for information and collect it.

```
cout << "Input total miles driven per day: ";
cin >> miles;

//get the user to input values for your variables and then do some math to calculate whatever it is you need

```

This post has been edited by Black_Epiphany: 11 February 2014 - 02:16 PM

• جوروترا

Reputation: 275
• Posts: 962
• Joined: 18-April 09

## Re: car-pool saving calculator using c++ application,

Posted 11 February 2014 - 06:05 PM

Quote

Here is what I was able to do.

Are you joking ? the code does not even compile. I believe you could do more unless you've been skipping your C/C++ class at school. Post some serious compile able code with the errors/problems you're facing and we would be glad to help out.

regards,

### #5 modi123_1

• Suitor #2

Reputation: 10675
• Posts: 41,554
• Joined: 12-June 08

## Re: car-pool saving calculator using c++ application,

Posted 11 February 2014 - 06:49 PM

Ease up there tarmizi.. ease up there.