Question: C programming help! Write a program that reads four positive integers , , , and compares the area of rectangle by to the area of

C programming help!

Write a program that reads four positive integers , , , and compares the area of rectangle by to the area of rectangle by . If the area of the first rectangle is greater than the area of the second rectangle, the program prints Rectangle [, ] is greater than rectangle [,]., where and are the sides of the first rectangle and and are the sides of the second rectangle. If the area of the first rectangle is lesser than the area of the second rectangle, the program prints Rectangle [, ] is lesser than rectangle [,]. If two rectangles have the same area, the program prints The rectangles have the same area.

Example of input: 4 5 3 6

Corresponding output: Rectangle [4,5] is greater than rectangle [3,6].

Example of input: 3 2 4 3

Corresponding output: Rectangle [3,2] is lesser than rectangle [4,3].

Example of input: 2 10 4 5

Corresponding output: The rectangles have the same area.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!