car-pool saving calculator using c++ application,

Page 1 of 1

4 Replies - 4312 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=82c0c58d7772602fee5114b15471b807&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 ashafie

• New D.I.C Head

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: 11492
• Posts: 45,350
• 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?
Was This Post Helpful? 0

#3 Black_Epiphany

• D.I.C Head

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

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

Posted 11 February 2014 - 02:12 PM

Read this http://www.cplusplus...orial/basic_io/

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

Was This Post Helpful? 0

#4 tarmizi_adam2005

• جوروترا

Reputation: 283
• Posts: 979
• 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,
Was This Post Helpful? 0

#5 modi123_1

• Suitor #2

Reputation: 11492
• Posts: 45,350
• 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.
Was This Post Helpful? 1

Page 1 of 1

 .related ul{list-style-type:circle;font-size:12px;font-weight:bold;}.related li{margin-bottom:5px;background-position:left 7px!important;margin-left:-35px;}.related h2{font-size:18px;font-weight:bold;}.related a{color:blue;}