Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int rentOrMorgageBill;
- int phoneBill;
- int utilityBill;
- int cableBill;
- double monthlyExpense;
- double annualExpense;
- cout << "Enter the amount that you pay per month in rent or morgage: $";
- cin >> rentOrMorgageBill;
- cout << "Enter the amount that you pay for your phone per month: $";
- cin >> phoneBill;
- cout << "Enter the amount that you pay for utilities per month: $";
- cin >> utilityBill;
- cout << "Enter the amount that you pay for cable per month: $";
- cin >> cableBill;
- monthlyExpense = rentOrMorgageBill + phoneBill + utilityBill + cableBill;
- annualExpense = monthlyExpense * 12;
- cout << " The total monthly housing cost for you is: $" << setprecision(2) << fixed << monthlyExpense << endl;
- cout << " The total annual housing cost for you is: $" << setprecision(2) << fixed << annualExpense << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement