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
One of the attributes in a table in your database depends on another attribute for its meaning. What type of dependency has been
posledela
We call it functional dependencies.

A functional dependency which is also commonly known as a database dependency occurs in a database when info stored in the same database determines other information stored in the same table. Knowing the value of a set of attribute is enough to tell you the value of another set of attributes.



5 0
3 years ago
Which can be used to create a poll on a web page? <br>CSS<br>HTML <br>JavaScript <br>Text editor​
NeX [460]

Answer:

HTML can be used to create a poll on a web page.

4 0
3 years ago
While researching ideas for cutting energy costs is his company. Hector watches an online video in which a business expert says,
Nataliya [291]
B. Put it in quotes if it is directly quoted as is and cite the source. You should likely also list the source in the works cited but not the phrase itself.
6 0
3 years ago
Read 2 more answers
Jacob is a teacher and wants to sort his grades based on Test 1 and then on Test 2.
Pachacha [2.7K]
<span>He would click on the Test 1 column and press Sort, then click on the Test 2 column and press Sort. 
 It depends on what you learn because it says "shift"</span>
4 0
3 years ago
Read 2 more answers
Tom wants to send an image by email to his friend Nadia. He needs to reduce
erica [24]

<u>1</u><u>s</u><u>t</u><u> </u><u>Method:</u>

  • Reduce the size of the image in <u>Paints.</u>

<u>2</u><u>n</u><u>d</u><u> </u><u>Method:</u>

  • Right-click the selected file you want to send.
  • Click on <u>Send To</u> > M<u>ail Recipient</u>.
  • The Send Pictures via E-mail dialog box appears.
  • Click <u>Make all my pictures smaller</u>, and then click OK.

Hope you could understand.

If you have any query, feel free to ask

6 0
2 years ago
Other questions:
  • Let's say you're creating a search stream in your hootsuite dashboard, to find mentions of the phrase vacation holiday getaway.
    15·1 answer
  • Write a program that ask the user to enter air water or Steele and the distance that a sound wave will travel in the medium the
    6·1 answer
  • You must have an active ____ to test external links.
    5·1 answer
  • How can an administrator make only the files and folders to which a user has at least Read permissions visible?
    13·1 answer
  • The sample remote access policy document from the hospital that you reviewed in the lab showed that the Remote Access Domain is
    15·2 answers
  • Which wildcard characters will return a single character when using the Find dialog box?
    6·2 answers
  • . ____________is/are the JSP ImplicitObject(s).sessionapplicationconfigAll of GivenNone of Given
    9·1 answer
  • When Adobe Photoshop was released for the first time? A: 1984 B: 1990 C: 1991 D: 1992
    8·1 answer
  • Write Epic username plz
    6·1 answer
  • the application you attempted to authenticate to is not authorized to use cas. contact your cas administrator to learn how you m
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!