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
17
Sauron [17]

let's firstly find the equation of the parabola, bearing in mind that x-intercepts or solutions/zeros/roots means y = 0.

\bf ~~~~~~\textit{vertical parabola vertex form} \\\\ y=a(x- h)^2+ k\qquad \begin{cases} \stackrel{vertex}{(h,k)} \end{cases} \\\\[-0.35em] \rule{34em}{0.25pt}\\\\ \begin{cases} h=1\\ k=-9 \end{cases}\implies y=a(x-1)^2-9 \\\\\\ \textit{we also know that } \begin{cases} x=0\\ y=-6 \end{cases}\implies -6=a(0-1)^2-9\implies 3=a(-1)^2

\bf 3=a\qquad \qquad \textit{therefore}\qquad \qquad \boxed{y=3(x-1)^2-9} \\\\[-0.35em] ~\dotfill\\\\ \stackrel{y}{0}=3(x-1)^2-9\implies 9=3(x-1)^2\implies \cfrac{9}{3}=(x-1)^2\implies 3=(x-1)^2 \\\\\\ \pm\sqrt{3}=x-1\implies \pm\sqrt{3}+1=x\implies x= \begin{cases} \sqrt{3}+1\\ -\sqrt{3}+1 \end{cases}\implies x\approx \begin{cases} 2.73\\ -0.73 \end{cases}

8 0
3 years ago
Read 2 more answers
C) How long does he travel at 30 km/h, if he travels 1.2 h at 20 km/h?​
Agata [3.3K]

Answer:

1.8 hrs

Step-by-step explanation:

1.2 hr = 20 km/hr

A hr = 30 km/hr

(cross multiply)

30 x 1.2 = 20 x A

(30 x 1.2) / 20 = A

on simplifying...

1.8 = A

Therefore, it takes 1.8 hrs to travel 30 km/hr

[this is totally my method]

4 0
2 years ago
For the graph of x &gt; 10, the boundary line
Varvara68 [4.7K]

Answer:

to the right

Step-by-step explanation:

you're looking for values over 10 to make the inequality true, meaning the numbers has to go larger, you'd draw the line vertically at 10, then shade to the right.

3 0
3 years ago
??????????????????????
irga5000 [103]

Answer:

A = 254.34

Step-by-step explanation:

Area of a circle formula:

A = πr²

r = d/2 = 9

A = 3.14(9²)

A = 3.14(81)

A = 254.34

4 0
3 years ago
Read 2 more answers
Is this the correct answer
enot [183]

Answer:

It should be correct.

8 0
4 years ago
Other questions:
  • The measures of two angles of an isosceles triangle are 3x + 4 and x + 16. Find all possible values of x
    11·1 answer
  • If x=3+5i and y=-2+7i, what is y-x?
    15·1 answer
  • Solve 1 over 36 = 6x−3. (1 point)
    7·1 answer
  • Determine the intercepts of the line that passes through the following points
    6·1 answer
  • Why tanX is not differentiable?
    13·1 answer
  • The coordinates of the vertices of △ABC are A(−4, 6) , B(−2, 2) , and C(−6, 2) .
    11·2 answers
  • What numbers round up and down to 600
    6·2 answers
  • A man drops a ball from the top of a 300 foot cliff. The height of the falling ball is
    7·1 answer
  • What is the answer help im having a mental breakdown
    5·2 answers
  • Please help me outtt
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!