Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Program: odometer.cc
- // Author: Yoan Pinzon
- // Date: Agosto 30, 2006
- #include <iostream>
- using namespace std;
- int main()
- {
- float start, end, mon, tue, wed, thr, fri, milespergalon;
- cout << "Odometer" << endl;
- cout << "========" << endl;
- cout << "start: "; cin >> start;
- cout << "end: "; cin >> end;
- cout << "Mon: "; cin >> mon;
- cout << "Tue: "; cin >> tue;
- cout << "Wed: "; cin >> wed;
- cout << "Thr: "; cin >> thr;
- cout << "Fri: "; cin >> fri;
- milespergalon = ( end - start ) / ( mon + tue + wed + thr + fri );
- cout << endl;
- cout << "Miles per galon= " << milespergalon;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement