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
Notes page view and Outline view are found in the<br> tab.<br> File<br> O Status<br> View<br> Page
monitta

Answer:

Page view and outline view available in "View" Tab.

Explanation:

<u>Page View:</u>

<u>There are four types of page views available in word.</u>

<u>1. Normal: </u>(Useful  when we need to write more text in word)

<u>2. Web layout: </u>(Use only when we are creating a website)

<u>3. Print layout: </u>(It is used to show the left, right, top and bottom margin for printing)

<u>4. Outline View:</u> (Used to make outline of whole document)

5 0
3 years ago
Write a function longer_string() with two string input parameters that returns the string that has more characters in it. If the
BartSMP [9]

Answer:

Here you go :)

Explanation:

Change this to your liking:

def longer_string(s1, s2):

   if len(s1) > len(s2):

       return s1

   elif len(s1) < len(s2):

       return s2

   else:

       return s2

x = input("Enter string 1: ")

y = input("Enter string 2: ")

print(longer_string(x, y))

4 0
2 years ago
How do you check how much space is left in current drive?
Aliun [14]

Answer:

The following steps are performed to check the space left in the current drive are:

  • Firstly, we open the file explorer in the system and we can also use the shortcut key in the keyboard that is window key + E. Also, by using the  task-bar we can easily use the folder icon for the further processioning.
  • By clicking on "This PC" icon from the left side window in the computer system.
  • And then we can easily see under the "C"window drive, the actual amount of space left in the current drive.

7 0
3 years ago
​this is another name for the wireless configuration in which a central wireless device is used to serve all wireless clients.
Daniel [21]
Infrastructure mode is another name for wireless configuration in which a central wireless device is used to serve all wireless clients.
6 0
3 years ago
What is a benefit of the Name Manager feature?​
Ostrovityanka [42]
Makes it personalised to you. If you don’t want people to use your excel work , putting your name on it or the person it belongs to’s name can make sure that it belongs to you or who it is meant to belong to.
6 0
3 years ago
Read 2 more answers
Other questions:
  • When purchasing a(n) ________ computer, having cellular as well as wifi can be important?
    9·1 answer
  • Which of the following are types of formatting you
    12·2 answers
  • To access WordPad, Jill will click on Start, All Programs, Accessories, and WordPad. To access Notepad, Karl will click on Start
    5·1 answer
  • You will be given a string, containing both uppercase and lowercase alphabets(numbers are not allowed).
    14·1 answer
  • Which ofthe following sentence beginnings would be best to use in apersuasive request?
    8·1 answer
  • You are the head of the corporate security department, and the Microsoft teamhas asked you for some assistance in setting the pa
    11·1 answer
  • Give one example of where augmented reality is used​
    11·2 answers
  • Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
    7·1 answer
  • Two girls were born to the same mother, on the same day, at the same time, in the same month and the same year and yet they're n
    7·1 answer
  • 17. What are the basic modes of operation of 8255?Write the features of mode 0 in 8255?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!