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
Valentin [98]
3 years ago
14

The area of a rectangle is the rectangle’s length times its width. Write a program that asks for the length and width of two rec

tangles. The program should tell the user which rectangle has the greater area, or if the areas are the same.

Mathematics
1 answer:
Mnenie [13.5K]3 years ago
7 0

Answer:

Using c++

Check the image for colors.

Step-by-step explanation:

#include <iostream>

using namespace std;

int main()

{

   float length1,length2,width1,width2,area1,area2;

   

   cout<<"length of Rectangle 1\n";

   cin>>length1;

   cout<<"\nwidth of Rectangle 1\n";

   cin>>width1;

   cout<<"\nlenght of Rectangle 2\n";

   cin>>length2;

   cout<<"\nwidth of Rectangle 2\n";

   cin>>width2;

   

   area1=length1*width1;

   area2=length2*width2;

   

   if (area1<area2)

   {cout << "\nRectangle 2 has greater area";}

   else {

               if (area1>area2)

                  {cout << "\nRectangle 1 has greater area";}

               else {cout << "\nAreas are the same";}

         }

   

   return 0;

}

You might be interested in
Ignore my work but solve the problem and check. Thank you!!
Free_Kalibri [48]
Yes good job you are correct
8 0
2 years ago
What is the value of each number here is the numbers 1,6,2,5 in 1,567.209 please help
photoshop1234 [79]
1 is thousands
6 is tens
2 is tenths
5 is hundreds
6 0
3 years ago
The number 0.14356712341… never repeats or terminates. The number is number. Rounded to the nearest thousandth, it is
Alenkinab [10]
0.144 because the number after 3 is 5 and that rounds the 3 to a 4.
3 0
3 years ago
Help me pwease ill give brainly c:
garri49 [273]

Answer:

b

Step-by-step explanation:

b says age less than 18, which is the people who can't vote.

Hope this helps! Please give brainliest!

5 0
3 years ago
Read 2 more answers
Which equation represents exponential decay?
MAVERICK [17]
Y=(1/5)^x would be the only equation demonstrating decay of these
6 0
3 years ago
Other questions:
  • Please help answer this question above
    14·2 answers
  • The scale on a map shows that 1 inch equals 5 feet. What is the distance between two points that are 8 inches apart on the map ?
    9·1 answer
  • What is the equation of the inverse function A(n)=3n-20
    15·1 answer
  • PLZ HELP I BEGGG 20 POINTS!!!!!!!
    6·1 answer
  • Find the value of x for which ℓ ∥ m.
    7·1 answer
  • Which of the following expressions represents the sum of a number and three is divided by two? 2 ÷ x + 3 2 ÷ (x + 3) (x + 3) ÷ 2
    11·2 answers
  • 20 points if you can answer this! :D​
    7·1 answer
  • How many triangles can be made if two sides are 4 inches and the angle between them is 90°?
    8·1 answer
  • 436÷2??? Con paso a paso no entendí y cuáles son los números paresjnbhhvygctfctgcgtvyg ygvybyhhvhvyvgyvchvgvgvgvgvgvggvgvggvygbb
    15·1 answer
  • Keith rented a truck for one day. There was a base fee of $17.99, and there was an additional charge of 97 cents for each mile d
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!