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
Simora [160]
3 years ago
5

The area of a rectangle is the rectangle's length times its width.

Computers and Technology
1 answer:
aliya0001 [1]3 years ago
4 0

Answer:

Following are program to this question:

#include <iostream> //defining header file  

using namespace std;  

int main() //defining main method

{

   double len1,len2,wid1,wid2,area1,area2; //defining double variable

   cout << "Enter first rectangle length: "; //print message

   cin >> len1;//input first rectangle length value

   cout << "Enter first rectangle width: ";//print message

   cin >> wid1; //input first rectangle width value

   area1 = len1*wid1; //calculate area and holds its value  

   cout << "Enter second rectangle length: ";//print message

   cin >> len2; //input second rectangle length value

   cout << "Enter second rectangle width: ";//print message

   cin >> wid2; //input second rectangle width value

   area2 = len2*wid2; //calculate area and holds its value  

   if(area1 > area2) //check condition area1 value is greater then area2

   {

    cout << "First rectangle area value is greater";//print message

   }

   else if(area2 > area1)//check condition area2 value is greater then area1

   {

       cout << "Second rectangle area value is greater";//print message

   }

   else //else block

   {

       cout << "both rectangle area is same";//print message

   }

   return 0;

}

Output:

Enter first rectangle length: 3

Enter first rectangle width: 5

Enter second rectangle length: 5

Enter second rectangle width: 3

both rectangle area is same

Explanation:

The description of the above program can be described as follows:

  • In the given code, the double variable is declared, which is "len1, len2, wid1, wid2, area1, and area2". In the next line, a message is a print, that accepts "len1 and wid1" value in the next line, the area variable is used that calculates area1.
  • In the next step, the "len2 and wid2"  variable is used, that accepts values and calculates its area, and in the next line, the conditional statement is used that checks its value.
  • In the if the block it uses both area1 and area2 value, that checks area1 is greater then area2, it is will print first rectangle area is greater.  
  • Otherwise, it will go to else if block, that checks area2 is greater then area1, it is will print second rectangle area is greater.  In the else section, it will print both equal areas.

You might be interested in
Photographs, illustrations, and videos are increasingly created an and viewed in digital formats. True or False​
lutik1710 [3]

Answer:

I think it's True but I don't know sorry if I'm wrong

6 0
2 years ago
Read 2 more answers
True or false? If you’re posting the same content across different channels, make sure you post them simultaneously—on the same
alukav5142 [94]

Answer:

The answer is true.

Explanation:

7 0
3 years ago
Today's consoles and games have audio features that rival cinematic audio.<br> True or False?
Angelina_Jolie [31]

Answer:

true

Explanation:

4 0
3 years ago
Read 2 more answers
Font issues arise when you attempt to run a presentation on a computer that does not have the fonts you used when creating the p
jenyasd209 [6]

Some computers have fonts that differ from one another – it could be because the user downloaded a different font styles from the various sources available from the Internet; it could also be because the user is creating his or her presentation in a computer with different operating systems.

In order to mitigate any error that might occur in the font style due to these circumstances, you should embed the font to the presentation while creating it. This ensures that the same font displays across all system.

3 0
3 years ago
A 3D printer has at least how many stepper motors?
lyudmila [28]
I believe it is 200 per revolution!
4 0
3 years ago
Other questions:
  • Use a colon before a list and put one space after a colon. True False
    15·2 answers
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • Consider the following sequence of items 10, 36, 25, 54, 37, 12, 75, 68, 42, 86, 72, 90. Insert these items in the order above,
    5·1 answer
  • Which is the best and quickest way for Jim to share his scuba experience with everyone?
    8·1 answer
  • C++
    11·2 answers
  • Drag the correct type of update to its definition.
    14·1 answer
  • When installing EMT conduit that will be exposed to wet conditions, _______ fittings should be used.
    5·2 answers
  • Can you move it like this? I can shake it like that
    6·1 answer
  • Your friend just gave you his old laptop. Whenever you turn on the laptop, though, a black screen appears and asks you to enter
    7·1 answer
  • // This pseudocode is intended to describe
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!