//OrinTill Qimid CS1A Chapter 3, P. 145, 9
//
/**************************************************************
* Calculate Automobile Cost
*
* ____________________________________________________________
* This program calculate the cost of any Automobile per month and year based on
* payment, insurance, gas, oil, maintance per month.
* ____________________________________________________________
* INPUT
* pay : loan payment per month
* insurance : insurance payed per month.
* gas : gas payed per month.
* oil : oil payed per month.
* tires : money spend on tires per month
* main : money spend on maintance per month.
* OUTPUT
* total_month : total amount of money spend per month
* total_year : total amount of monery spend yearly.
**************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
float pay,
insurance,
gas,
oil,
tires,
main,
total_month,
total_year;
cout<<"please enter your loan payment amount monthly."<<endl;
cin>> pay;
cout<<"pleasen enter your insurance fee spend monthly."<<endl;
cin>> insurance;
cout<<"please enter how much you spend on gas spend monthly."<<endl;
cin>> gas;
cout<<"Please enter how much you spend on oil per month."<<endl;
cin>>oil;
cout<<"Please enter how much you spend on tires per month"<<endl;
cin>> tires;
cout<<"Please enter how much you spend to maintance your car per month"<< endl;
cin>> main;
total_month = pay + insurance + gas + oil + tires + main;
total_year = total_month * 12;
cout<<"Your spending on your automobile per month is $"<< total_month<<endl;
cout<<"Your spending on your automobile per year is $"<< total_year<<endl;
return 0;
}
Ly9PcmluVGlsbCBRaW1pZCBDUzFBIENoYXB0ZXIgMywgUC4gMTQ1LCA5Ci8vCi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiBDYWxjdWxhdGUgIEF1dG9tb2JpbGUgQ29zdAogKiAKICogX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiAqIFRoaXMgcHJvZ3JhbSBjYWxjdWxhdGUgdGhlIGNvc3Qgb2YgYW55ICBBdXRvbW9iaWxlIHBlciBtb250aCBhbmQgeWVhciBiYXNlZCBvbiAKICogcGF5bWVudCwgaW5zdXJhbmNlLCBnYXMsIG9pbCwgbWFpbnRhbmNlIHBlciBtb250aC4KICogX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiAqIElOUFVUCiAqIHBheSA6IGxvYW4gcGF5bWVudCBwZXIgbW9udGgKICogaW5zdXJhbmNlIDogaW5zdXJhbmNlIHBheWVkIHBlciBtb250aC4KICogZ2FzIDogZ2FzIHBheWVkIHBlciBtb250aC4KICogb2lsIDogb2lsIHBheWVkIHBlciBtb250aC4KICogdGlyZXMgOiBtb25leSBzcGVuZCBvbiB0aXJlcyBwZXIgbW9udGgKICogbWFpbiA6IG1vbmV5IHNwZW5kIG9uIG1haW50YW5jZSBwZXIgbW9udGguCiAqIE9VVFBVVAogKiB0b3RhbF9tb250aCA6IHRvdGFsIGFtb3VudCBvZiBtb25leSBzcGVuZCBwZXIgbW9udGgKICogdG90YWxfeWVhciA6IHRvdGFsIGFtb3VudCBvZiBtb25lcnkgc3BlbmQgeWVhcmx5LgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPGlvbWFuaXA+CiNpbmNsdWRlIDxjbWF0aD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgCnsKIGZsb2F0IHBheSwKIGluc3VyYW5jZSwKIGdhcywKIG9pbCwKIHRpcmVzLAogbWFpbiwKIHRvdGFsX21vbnRoLAogdG90YWxfeWVhcjsKIGNvdXQ8PCJwbGVhc2UgZW50ZXIgeW91ciBsb2FuIHBheW1lbnQgYW1vdW50IG1vbnRobHkuIjw8ZW5kbDsKIGNpbj4+IHBheTsKIGNvdXQ8PCJwbGVhc2VuIGVudGVyIHlvdXIgaW5zdXJhbmNlIGZlZSBzcGVuZCBtb250aGx5LiI8PGVuZGw7CiBjaW4+PiBpbnN1cmFuY2U7CiBjb3V0PDwicGxlYXNlIGVudGVyIGhvdyBtdWN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