Rectangular Plots
Single File Programming Question
Problem Statement
One day, a creative architect received an unusual request from a client. The client needed a software program to calculate the area of rectangle-shaped garden plots. The client had the idea of using rectangular plots with various widths and heights to create unique gardens.
Write a program using a class Rectangle and a constructor to calculate the area of the rectangle.
Formula:
area of the rectangle = width * height
Input:
format :The input consists of two space-separated double values, representing the width and height, respectively.
Output:
format :The output prints the area of the rectangle, rounded off to two decimal places.
Refer to the sample output for formatting specifications.
Code constraints : The given test cases fall under the following constraints:
1.0 ≤ width, height ≤ 100.0
Sample test cases :
Input 1:
4.4 5.3
Output 1 :
23.32
Input 2 :
12.5 9.8
Output 2 :
122.50