computer
Jonathan Kincade
Gordon Welch
Adam Fink
Thai Do
Ali Alsahaf
Conard Mullins
Patrick Donavan
Frank Noone
CS1160 Lab #1-1: Specifacations
Determine out of two cars which car is more price efficient over 5 years, a cheaper ($20,000) yet lower (20mpg) gas mileage car, or more expensive ($50,000) but higher (45mpg) gas mileage car if you are driving 12,000 miles a year over 5 years with gas costing $3 per gallon.
Input: Price of car 1, price of car 2, Average MPG car 1, average mpg of car 2., Gas cost, Distance driven, Years driven, Initial cost.
Algorithm: Lower Cost car= gas cost times years driven times miles per year divided by average MPG + initial car cost
Repeat with higher cost car values
Output: If Car 1 cost less than Car 2 output is Car 1. If Car 2 cost less than Car 1, then output is Car 2.
Table 2 gave best feedback