Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SC124-Classwork 3-1 124 by ibtsammahlouz Problem Leaderboard Discussions The area of a rectangle is the rectangle's length x width. Write a program that asks the

image text in transcribed
image text in transcribed
SC124-Classwork 3-1 124 by ibtsammahlouz Problem Leaderboard Discussions The area of a rectangle is the rectangle's length x width. Write a program that asks the user for the length and width of two rectangles and calculates the area of each rectangle. It should print out a message indicating whether the area of the 2 rectangles are equal or not. The messages should say "The rectangles have the same area: 100.78" or "The rectangles do not have the same area: 100.78 and 28.45 Note: The length and width can be decimal numbers. Print the area with only 2 digits after the decimal. Input Format floating-point numbers Constraints none Output Format whether rectangles have same area or not Sample Input 0 10 20 40 Sample Output o int arA Int varA Enter length A: Enter width A: Enter length B: Enter width B: Area A: 200.0e Area 8: 200.96 Areas are equal int Sample Input 1 20 30 20 Sample Output 1 Enter length A: Enter width A: Enter length B: Enter width B: Area A: 600.00 Area B: 200.8 Areas are NOT equal Current Buffer (saved locally, editable) P

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions