answer.
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
Deffense
2 months ago
12

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.051) / 12 (Note: Output directly. Do not store in a variable.). c
Computers and Technology
1 answer:
Rzqust [1K]2 months ago
3 0

Response:

See the explanation

Clarification:

/Initializing variables

integer currentPrice

integer lastMonthPrice

integer changeLastMonth

float mortgage

//Taking input

currentPrice = Get next input

lastMonthPrice = Get next input

//Determining price change

changeLastMonth = currentPrice - lastMonthPrice

//Calculating mortgage

mortgage = (currentPrice * 0.051) / 12

//Displaying output

Put "This house costs $" to output

Put currentPrice to output

Put "\nThe change is $" to output

Put changeLastMonth to output

Put " since last month." to output

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

Put mortgage to output

You might be interested in
Which correctly lists the two elements that make up the empty space in the universe? ice and debris debris and dark matter dark
Rzqust [1037]
The correct response is "dark matter and dark energy and dust." Explanation: In the vast emptiness of the universe, it’s filled with gases and residuals. While humans may perceive the empty space as devoid of contents, it includes plasma hydrogen and helium gases, in addition to various types of dirt and remnants. There's a variety of other materials, but greenhouse gases and dust comprise the majority.
5 0
11 days ago
Read 2 more answers
if you had two proxy servers located in the same room, what use could you make of them? nothing create a hub sell one of the ser
Harlamova29_29 [1022]
Establish a free wifi service
6 0
1 month ago
Read 2 more answers
The level of the computer hierarchy where an operating system functions is the ______. digital logic level system software level
Natasha_Volkova [1026]
I hold the top position in the hierarchy!
6 0
1 month ago
Read 2 more answers
Write a function called sum_scores. It should take four arguments, where each argument is the team's score for that quarter. It
Rzqust [1037]
Here’s a Python program containing a function named sum_scores: def sum_scores(score1, score2, score3, score4): total = score1 + score2 + score3 + score4 print(total) sum_scores(14, 7, 3, 0). This outputs the cumulative score of 24. If preferred, rather than printing the result, a return statement could be used to provide the sum.
5 0
23 days ago
Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The user shoul
zubka84 [1067]

The do-while loop for this task is presented below.

do

{

// request the user to input two numbers

cout<<"Please input two numbers to add."<<endl;

cin>>num1;

cin>>num2;

sum = num1 + num2;

// display the sum

cout<<"The sum of the two numbers is "<<sum<<endl;

// ask the user if they want to continue

cout<<"Would you like to keep going (y/n)?"<<endl;

cin>>choice;

}while(choice!= 'n');

The variables for the two numbers and their sum are defined as float for compatibility with both integers and decimals.

float num1, num2, sum;

The choice variable is char since it only needs to hold a single character input from the user, either 'y' or 'n'.

char choice;

The complete program is structured as follows:

#include <iostream>

using namespace std;

int main() {

float num1, num2, sum;

char choice;

do

{

// request the user to input two numbers

cout<<"Please input two numbers to add."<<endl;

cin>>num1;

cin>>num2;

sum = num1 + num2;

// display the result

cout<<"The sum of the two numbers is "<<sum<<endl;

// query the user on continuing

cout<<"Would you like to keep going (y/n)?"<<endl;

cin>>choice;

}while(choice!= 'n');

cout<<"Exiting..."<<endl;

}

5 0
1 month ago
Other questions:
  • Represent decimal number 8620 in (a) BCD, (b) excess-3 code, (c)2421 code, and (d) as a binary number
    7·1 answer
  • For Adults/Adolescents, you should call/activate EMS: Before providing CPR. After providing CPR for 2 minutes. After an AED has
    13·1 answer
  • (Java)Write a program that calculates and displays the conversion of an entered number of dollars into currency denominations—20
    11·1 answer
  • If a cell reference is c6, this cell is in the sixth column and the third row. true or false
    11·2 answers
  • The Online Shopping system facilitates the customer to view the products, inquire about the product details, and product availab
    8·1 answer
  • Disk scheduling algorithms in operating systems consider only seek distances, because Select one: a. modern disks do not disclos
    13·1 answer
  • Which of the following attributes of a website indicates a more reliable source for information?
    15·1 answer
  • Write a class for a Cat that is a subclass of Pet. In addition to a name and owner, a cat will have a breed and will say "meow"
    9·1 answer
  • #Write a function called random_marks. random_marks should #take three parameters, all integers. It should return a #string. # #
    10·1 answer
  • Write a MATLAB function named lin_spaced_vector with two inputs and one return value. The first input will be a single real numb
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!