Question

Sites like Zillow get input about house prices from a database and provide nice summaries for...

Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, 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.0. In Coral please!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Coral Program:

//Declaring variables
integer currentPrice
integer lastMonthPrice
integer changeLastMonth
float mortagage

//Reading input
currentPrice = Get next input
lastMonthPrice = Get next input

//Calculating price change
changeLastMonth = currentPrice - lastMonthPrice

//Calculating mortagage
mortagage = (currentPrice * 0.045) / 12

//Printing output
Put "This house is $" to output
Put currentPrice to output

Put "\nThe change is $" to output
Put changeLastMonth to output
Put " since last month." to output

Put "\nThe estimated monthly mortgage is $" to output
Put mortagage to output
___________________________________________________________________________________________

Sample Run:

Variables 200000 currentPrice 210000 lastMonthPrice -10000 changeLastMonth integer 750.0 mortagage integer integer float Inpu

Add a comment
Know the answer?
Add Answer to:
Sites like Zillow get input about house prices from a database and provide nice summaries for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • THE PROBLEM: The nice folks from the Lion Lending Company have hired you to write some...

    THE PROBLEM: The nice folks from the Lion Lending Company have hired you to write some software that will process their daily loan information. The data will come from a text file that has the following format: The first line will contain an integer: number of loan applications There will be two rows for each of the customers First line will be the customer's (1) first name and (2) last name, separated by a space (assume there is no spaces...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT