#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
double loanPayment, insurance, gas, oil, tires, maintenance;
double monthlyTotal, annualTotal;
cout << "Enter your monthly loan payment: ";
cin >> loanPayment;
cout << "Enter your monthly insurance: ";
cin >> insurance;
cout << "Enter your monthly gas expense: ";
cin >> gas;
cout << "Enter your monthly oil expenses: ";
cin >> oil;
cout << "Enter your monthly tires expenses: ";
cin >> tires;
cout << "Enter your monthly maintenance expenses: ";
cin >> maintenance;
monthlyTotal = loanPayment + insurance + gas + oil + tires + maintenance;
annualTotal = monthlyTotal * 12;
cout << setprecision(2) << fixed;
cout << "Monthly expenses are: $" << monthlyTotal << endl;
cout << "Annual expenses are: $" << annualTotal << endl << endl;
return 0;
}
Need some help been getting a too many arguments error
using source lair
What exactly isn't working? I don't see anything wrong. What line is giving you this error?
Threw it in VS 2015 and it ran good. Sorry, not sure what the problem is code all looks good.