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

summary Sites like Zillow get input about house prices from a database and provi

ID: 3874923 • Letter: S

Question

summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with inputs current price and last month's price (both integers), and output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice 0.045)/12. Ex: If the input is 200000 210000, the output is: This house is $200000. The change is $-10000 since last month The estimated monthly mortgage is $750 Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment Such precision is an important part of programming. LAB AY0.1: CH1 LAB: Input and formatted output House real estate summary 0/10 main.cpp Load default template. include 2 using nanespace std; 4 int main) 5 int currentPrice; 6 int lastMonthsPrice; 8 cin > currentPrice; 9 cin lastMonthsPrice; 1e 11 V Type your code here. 12 13 14 15 return Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the programs output in the second box Develop mode Submit mode

Explanation / Answer

#include <iostream>
using namespace std;

int main() {
int currentPrice,lastMonthPrice,monthlyMortgage;

cout<<"Enter current price and last month price of the house : ";
cin>>currentPrice>>lastMonthPrice;

cout<<" This house is $"<<currentPrice<<".";
cout<<"The change is $"<<(currentPrice-lastMonthPrice)<<" since last month.";

monthlyMortgage = (currentPrice *0.045)/12;

cout<<" The estimated monthly mortgage is $"<<monthlyMortgage<<".";
return 0;
}

Output:

Enter current price and last month price of the house : 200000 210000
This house is $200000.The change is $-10000 since last month.
The estimated monthly mortgage is $750.