I have been given the task of coming up with a carbon calculator but do to my poor math and scripting skills, I cannot come up with anything that works.
Here is what the calculator needs:
Code:
INPUT LINES:
[ x ] Enter daily roundtrip commute miles
CALCULATIONS:
Pounds of Daily Carbon Emissions:
X/20.2 = Y daily fuel burned
Y (19.4) = Z Pounds of Carbon emitted Daily
Pounds of Annual Carbon Emissions:
Z(156) = A Annual Carbon Emissions emitted by driving 3 days per week
Dollars spent on Daily fuel
Y(4.2) = B Daily Dollars spent on fuel for commute
Dollars spent on Annual Fuel
B(156) = C Annual Dollars spent on fuel for commute 3 days per week
Output:
[Z] Number of pounds of CO2 emissions saved annually by commuting by bicycle 3 times per week
[C] Annual Dollars saved on fuel by commuting by bicycle 3 times per week
The closest that I can find on the net is this: http://www.qbp.com/ but its not exactly what I need and I don't want to take from that site.
Anyone have any suggestions?
|