Question

The area of a rectangle is the rectangle's length times its width. Design the pseudocode for...

The area of a rectangle is the rectangle's length times its width. Design the pseudocode for a program that asks for the length and width of two rectangles.The program should tell the user which rectangle has the greater area, or if the areas are the same.

Homework Answers

Answer #1

START

DECLARE length1, width1 , length2, width2, area1, area2

READ   length1, width1, length2, width2

area1 = length1 * width1

area2 = length2 * width2

IF area1 > area2

DISPLAY “Larger area: “ area1

ELSE IF area2 > area1

DISPLAY “Larger area: “ area2

ELSE

DISPLAY “Areas are equal “

END IF

END

---------------------------------------------------------------------------------

Thank You ! I hope you understood the code, because it is self understandable. If you like the answer please UPVOTE.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A rectangle's length is 10 inches greater than its width. If the perimeter of the rectangle...
A rectangle's length is 10 inches greater than its width. If the perimeter of the rectangle is 56 inches, find the length (in inches)
the length of a rectangle is 4 inches more than its width. the area of the...
the length of a rectangle is 4 inches more than its width. the area of the rectangle is equal to 5 inches more than 2 times the perimeter. find the length and the width of the rectangle.
A rectangle has an area of 30.26 cm2. When both the length and width of the...
A rectangle has an area of 30.26 cm2. When both the length and width of the rectangle are increased by 1.80 cm, the area of the rectangle becomes 55.64 cm2. Calculate the length of the shorter of the two sides of the initial rectangle.
A rectangle has an area of 35.60 cm2. When both the length and width of the...
A rectangle has an area of 35.60 cm2. When both the length and width of the rectangle are increased by 1.40 cm, the area of the rectangle becomes 55.62 cm2. Calculate the length of the shorter of the two sides of the initial rectangle.
A rectangle has an area of 42.18 cm2. When both the length and width of the...
A rectangle has an area of 42.18 cm2. When both the length and width of the rectangle are increased by 1.30 cm, the area of the rectangle becomes 63.24 cm2. Calculate the length of the shorter of the two sides of the initial rectangle. The answer of 2.5 has been marked incorrect.
A rectangle has an area of 36.36 cm2. when both the length and width of the...
A rectangle has an area of 36.36 cm2. when both the length and width of the rectangle are increased by 1.40cm, the area of the rectangle becomes 57.50cm2. calculate the length of the tow sides of the initial rectangle.
The length of a rectangle is increasing at a rate of 5 cm/s and its width...
The length of a rectangle is increasing at a rate of 5 cm/s and its width is increasing at a rate of 4 cm/s. When the length is 15 cm and the width is 6 cm, how fast is the area of the rectangle increasing?
The length of a rectangle is increasing at a rate of 8 cm/s and its width...
The length of a rectangle is increasing at a rate of 8 cm/s and its width is increasing at a rate of 9 cm/s. When the length is 9 cm and the width is 5 cm, how fast is the area of the rectangle increasing?
Lab: RectClass (constructor) Code in C++ This program creates a Rectangle object, then displays the rectangle's...
Lab: RectClass (constructor) Code in C++ This program creates a Rectangle object, then displays the rectangle's length, width, and area Define an overloaded constructor and use it when creating the Rectangle object instead of using the setters. Change this program to calculate and display the rectangle's perimeter. Example: In feet, how wide is your house? 20 In feet, how long is your house? 25 The house is 20.00 feet wide. The house is 25.00 feet long. The house has 500.00...
the length of a rectangle is 3 ft less than twice the width. the area of...
the length of a rectangle is 3 ft less than twice the width. the area of the rectangle is 27 ft^2. find the dimensions