Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please use C++ when programming Please create the pseudocode and then code, debu

ID: 3753507 • Letter: P

Question

Please use C++ when programming

Please create the pseudocode and then code, debug and create the submittal files for the following problem It's pretty expensive to live in San Diego. Please write a program that asks the user for the monthly costs (one at a time) for the following expenses: rent, gasoline (or bus fare), food, electricity, and health insurance. Add all those up and then add an additional 25% for miscellaneous expenses. Then ask the user for his/her monthly income. Calculate how much is left over (or how much debt they will incur) each month. That number should be displayed with two decimal places so it looks like money Sample output: This month you have 45.67 Program 3-28 in your textbook can be used as an example of a program that asks the user for input, calculates an answer and displays the result Other Notes: 1. Use setprecision and whatever other iomanip functions you need to make your money output have two decimal places. 2. Make sure that you name your C++ variables correctly. One word variables are not capped. Two word variables have the first lowercase and the second word uppercase. Like this: money and myMoney

Explanation / Answer

Hi There , Below is the c++ code of the problem and ideone link (https://ideone.com/jIjk5n)

#include <iostream>

#include <iomanip>

using namespace std;

int main() {

double costRent;

cout << "enter monthly cost for rent" << endl;

cin >> costRent;

double costGasoline;

cout << "enter monthly cost for gasoline" << endl;

cin >> costGasoline;

double costFood;

cout << "enter monthly cost for food" << endl;

cin >> costFood;

double costElectricity;

cout << "enter monthly cost for electricity" << endl;

cin >> costElectricity;

double costHealthInsurance;

cout << "enter monthly cost for health insurance" << endl;

cin >> costHealthInsurance;

double total = costRent + costGasoline + costFood + costElectricity + costHealthInsurance;

// 25% extra for miscellaneous

double totalExpenditure = total + (total / 4);

double monthlyIncome;

cout << "enter the monthly income" << endl;

cin >> monthlyIncome;

double leftOver = monthlyIncome - totalExpenditure;

cout << "This month you have" << std::setprecision(2) << leftOver;

return 0;

}