#include <iostream>
#include <iomanip>
using namespace std;
int main() {
double income, rent, utilities, groceries, transportation, entertainment;
double totalExpenses, savings;
// Input monthly expenses
cout << "Enter your monthly income: $";
cin >> income;
cout << "Enter your monthly rent or mortgage payment: $";
cin >> rent;
cout << "Enter your monthly utilities costs: $";
cin >> utilities;
cout << "Enter your monthly groceries expenses: $";
cin >> groceries;
cout << "Enter your monthly transportation expenses: $";
cin >> transportation;
cout << "Enter your monthly entertainment expenses: $";
cin >> entertainment;
// Calculate total expenses and savings
totalExpenses = rent + utilities + groceries + transportation + entertainment;
08-26
165
04-21
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交