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
A cylindrical grain bin has a radius of 7 feet and a height of 25 feet. How many cubic feet of grain can the bin hold
dimaraw [331]

Answer:

1225π

Step-by-step explanation:

The question concerns the volume of the cylinder.

The formula of the volume is:

V=\pi r^{2} h, where r is the radius and h is the height.

Plugging the given numbers into the formula, we find that:

V=\pi * 49 * 25=1225\pi

The result - 1225π shows that the cylinder can be filled fully with that given amount.  

5 0
3 years ago
I need help with this 2(n+3) - 4 &lt; 6 n
Harman [31]

Answer:

Step-by-step explanation:

2(n+3) - 4 < 6n

2n+6-4 < 6n

2n + 2 < 6n

2 < 4n

½ < n

7 0
2 years ago
What is the solution to this equation? 2x+4=16
AlekseyPX

2x+4=16\\\\2x=12\\\\x=6

3 0
3 years ago
If two angles of a triangle have measures of 42° and 20°, what is the measure of the
iris [78.8K]

Answer:

118°

Step-by-step explanation:

the angle measures of a triangle will always add up to 180

so..

42+20=62

180-62=118

4 0
3 years ago
Read 2 more answers
Which tag/code do you alwaysstart aweb page with
SIZIF [17.4K]
Www. is your answer. Hope I could help
4 0
3 years ago
Other questions:
  • what if erika and Bradley want to hike 14 miles each day? how many days will they hike exactly 14 days?
    12·2 answers
  • Please Answer !!! The coefficients in the expansion of (x+y)^5 are
    8·2 answers
  • If g(x) = x-2, find g(-3).<br>g(-3) =​
    13·1 answer
  • Explain how to write a linear equation for a line on a graph.
    6·1 answer
  • 340 pages; 20% decrease 340 pages; 20% decrease
    5·1 answer
  • If 8 Superscript y Baseline = 16 Superscript y + 2, what is the value of y? –8 –4 –2 –1
    8·1 answer
  • HELP ME PLEASE ASAP WORK DUE IN AN HOUR PLEASEEE!!!! WILLING TO GIVE ANYTHING
    14·1 answer
  • HELP PLZ
    5·1 answer
  • What is the root of the polynomial equation x(x-2)(x+3) = 18? Use a graphing calculator and a system of equations.
    12·1 answer
  • Find S? Please help, thank you :)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!