1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
guapka [62]
3 years ago
13

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
Computers and Technology
2 answers:
lana66690 [7]3 years ago
8 0

Answer:

Here is code in c++.

#include <bits/stdc++.h>

using namespace std;

//main function

int main() {

// variables to store input and calculate price change and mortgage

int current_price,last_price,change;

float mortgage=0;

cout<<"Please enter the current month price:";

//reading current month price

cin>>current_price;

cout<<"Please enter the last month price:";

//reading last month price

cin>>last_price;

// calculating difference

change=current_price-last_price;

 // calculating mortgage

mortgage=(current_price*0.045)/12;

//printing output

cout<<"The change is $"<<change<<" since last month."<<endl;

cout<<"The estimated monthly mortgage is $"<<mortgage<<endl;

return 0;

}

Explanation:

Read the current month price and assign it to "current_price" and last month

price to variable "last_price". Calculate change from last month by subtracting

current_price-last_price.And then calculate monthly mortgage as (current_price*0.045)/12. Then print the output.

Output:

Please enter the current price:200000                                                                                                                          

Please enter the last month price:210000                                                                                                                      

The change is $-10000 since last month.                                                                                                                        

The estimated monthly mortgage is $750

lisov135 [29]3 years ago
3 0

Answer:

current_price = int(input())

last_months_price = int(input())

finalprice= current_price-last_months_price

monthly= (current_price*0.051)/12

print('This house is', '$''{:.0f}'.format(current_price),end='.')

print(' ''The change is', '$''{:.0f}'.format(finalprice), 'since last month.')

print('The estimated monthly mortgage is', '$''{:.2f}'.format(monthly),end='.''\n')

Explanation:

You might be interested in
How does toothbrushes affect the world of technology?
Yuri [45]

Answer:

The invention of the toothbrush made a huge impact of society and people for many reasons. You should always brush your teeth and keep your mouth clean so you will have nice, white teeth, healthy gums, good breath, and just a clean mouth! Without the toothbrush, your mouth would be smelly, gross, and full of bacteria.Some of the different impact categories included acidification, climate change, eutrophication, human health, land use, resource use and water scarcity. The results concluded that the electric toothbrush had the greatest environmental impact in 15 out of the 16 categories with water scarcity being the exception.Using the electric toothbrush as an example, this article examines the growing acceptability of domestic health technologies that blur the traditional boundaries between health, aesthetics and consumption. By using empirical material from individual and household interviews about people's oral health practices, this research explores the relationships between an everyday artefact, its users and their environments. It investigates the ways in which oral health technologies do, or do not, become domesticated in the home environment. We conclude that the domestication of oral health technologies is not inevitable, with the electric toothbrush often becoming an ‘unstable object' in the domestic setting.

Explanation:

3 0
2 years ago
Read 2 more answers
Consider the following code segment: try : inputFile = open("lyrics.txt", "r") line = inputFile.readline() print(line) _________
aleksandrvk [35]

Answer:

The answer is "except IOError:"

Explanation:

It is part of the exception handling, that stands for input/ output operation fails, this exception aeries when we attempting to access an anti-existent file, in the program so, it will give the program related errors.

  • This type of error is handled in the try block, it also allows you to prepare the deal with the exceptional block.  
  • It also helps you to hide the bugs by using code, if you handle an unexpected error.
6 0
2 years ago
Which statements describe the use of styles in Word? Check all that apply.
algol [13]

Answer:

can be used to make word docments look the same

Explanation:

4 0
3 years ago
Read 2 more answers
The int function can convert floating-point values to integers, and it performs rounding up/down as needed.
omeli [17]

Answer:

Thks is true the int function changes a float value to an integer and will round up or down by default.

5 0
2 years ago
Which of the following is NOT true about variables?
VikaD [51]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The value stored by a variable can be changed after it is assigned(true).

The value of a variable can be changed after it is assigned, for example:

int a=10;

and we can change the value of variable a in letter program such as:

a=15;

Variables are a name for a spot in the computer's memory (true).

it is true, because the variables value stored in the computer's memory and we can access theses values by their name (variable name). so Variables are a name for a spot in the computer's memory.

Variable names can be words: such as temperature or height (true).

Yes, the variable name can be words such as height, width, temperature etc.

The value stored by a variable cannot be changed after it is assigned (false).

It is noted that the value stored by a variable can be changed after it is assigned. However, it is noted that is some programming language, you can't change the value of static variable.

3 0
3 years ago
Other questions:
  • In a paragraph of no less than 125 words, describe how you would insert a graph in your word-processing document.
    8·2 answers
  • (GAME DESIGN)
    15·1 answer
  • What is one course of action available in every problem solving process?
    9·2 answers
  • An embedded os must be developed specifically for use with embedded systems. true or false?
    6·1 answer
  • The retention of encoded information over time is called storage. A measure of memory storage that involves identifying informat
    5·1 answer
  • Write an application that instantiates five Recording objects and prompts the user for values for the data fields. Then prompt t
    13·1 answer
  • What kind of server connects a remote system through the internet to local serial ports using tcp/ip?
    9·1 answer
  • Write a program that will generate 100 integers between 0 and 1000. Store the even numbers in a sorted linked list called evens.
    12·1 answer
  • What are the benefits of using an ordered list vs. an unordered list? What are the costs?
    10·1 answer
  • WILL GIVE BRAINLIEST!!! PLEASE HELP!!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!