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
EleoNora [17]
3 years ago
14

2.32 LAB: Input and formatted output: House real estate summary Sites like Zillow get input about house prices from a database a

nd 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 as a floating-point value. Do not store in a variable.). 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 $850.000000. 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.
Computers and Technology
1 answer:
valkas [14]3 years ago
4 0

Answer:

C++.

Explanation:

int main() {

   int current_price, last_months_price;

   // Inputs

   cin<<current_price;

   cout<<endl;

   cin<<last_months_price;

   cout<<endl;

   // Outputs

   cout<<"This house is $"<<current_price<<endl;

   cout<<"The change is $"<<(current_price - last_months_price)<<endl;

   cout<<"The estimated monthly mortgage is $"<<((current_price * 0.051) / 12);

   return 0;

}

You might be interested in
Write a partial class that shows a class constant and an instance method. Write an instance method that converts feet to inches
MA_775_DIABLO [31]

Answer:

Please the code snippet below, the code was writen in Kotlin Language

Explanation:

const val inches:Int= 12 .   //This is the const value

fun main(args: Array<String>) {

 //this will ask the user for input

   print("Enter a number")            

  //this will do the conversion

var valueInFeet= Integer.valueOf(readLine())*inches

   print("The value in feet is $valueInFeet feet(s)")  

   }

4 0
2 years ago
What is the maximum rate at which computers A and B can communicate, via router X? (your answer should be in Mbps)
eduard
450Mbps on the 2.4GHz band and 1300Mbps on the 5GHz band
7 0
3 years ago
An online game is played with two dice. In this context, explain what is meant by decomposition.
Vlad [161]

Answer:

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

Explanation:

This question is about desinging a game that is played with two dice and gets or shows their value to the player.

The dice value is random, and it can be between one and six. So, you need to generate two numbers between 1 and 6. You may also need to display the numbers

The main part of this program is that you need to know the numbers to limit or restrict what the user may do next while playing.

That's most of the first level of decomposition for solving a problem. In decomposition, you need to keep decomposing (breaking) the problem into smaller pieces, thinking outline of the program and deciding what objects, functions, variables, and logic you're going to implement in the coding.

4 0
3 years ago
Which statement best describes a computer program?
ziro4ka [17]

Answer:

B is the best answer.

Explanation:

All other options listed are related to a program but B beast answers the question.

7 0
2 years ago
github Portfolio Balances An investor opens a new account and wants to invest in a number of assets. Each asset begins with a ba
OLEGan [10]

The following code will be used to determine the maximum amount invested

<u>Explanation:</u>

long maxValue(int n, int rounds_rows, int rounds_columns, int into rounds)

{

   // Define the variable to store

   // the maximum amount invested.

   long max = 0;

   

   // Define an array of size n,

   // to store the n investments.

   long *investments = (long*)malloc(sizeof(long)*n);

   int i=0;  

   // Initially set all

   // the investments to 0.

   for(i=0;i<n;i++)

   {

       investments[i] = 0;

   }

   i=0;

   // Run the loop to

   // perform the rounds.

   while(i<rounds_rows)

   {

       // Get the left value

       // of the current round.

       int left = rounds[i][0];

       

       // Get the right value

       // of the current round.

       int right = rounds[i][1];

       // Get the contribution

       // for the current round.

       int contribution = rounds[i][2];

       // Since the user uses 1-based

       // indexing, subtract 1 from left

       // and right as the program uses

       // 0-based indexing. That is, the

       // investments in the array start

       // from 0 and not 1.

       right = right - 1;

       int j=0;

       // Run the loop to add the

       // contribution to all the investments

       // between left and right, both inclusive.

       for(j=left; j<=right; j++)

       {

           investments[j] += contribution;

       }

       i++;

   }

   // Traverse the investments array

   // to find the maximum element.

   max = investments[0];

   for(i=1; i<n;i++)

   {

       if(investments[i]>max)

       {

           max = investments[i];

       }

   }

   // Return the

   // maximum investment.

   return max;  

}

6 0
3 years ago
Other questions:
  • An IT department submits a purchase order to buy a new computer from a vendor. "Purchase orders" are documents issued by buyers
    12·1 answer
  • Pointsyour company environment includes windows server versions 2003, 2008, and 2012. desktops range from windows xp and vista.
    13·1 answer
  • Using computer software, compare the 2016 year-to-date sales through February to the 2017 year-to-date sales through February fo
    15·1 answer
  • What resources can be shared over a computer network?
    12·2 answers
  • What are the main types of reading tools? Check all that apply. please HELP​
    15·1 answer
  • Match the items with their respective descriptions.
    6·2 answers
  • CLS <br> N = 1<br> FOR J = 1 TO 5 <br> PRINT N<br> N = 10*N+1 <br> NEXT J<br> END
    14·1 answer
  • The capability of moving a completed programming solution easily from one type of computer to another is known as ________. Grou
    15·1 answer
  • You can enter common data in multiple worksheets by __________.
    14·2 answers
  • Choose the answer.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!