Find Area of Rectangle

Easy
0/40
1790 upvotes
Asked in company
Razorpay

Problem statement

Take the length(L) and breadth(B) of the rectangle as input and find its area.

Note:
Length and breadth must be an integer value and the area will always be in the range of integers.
Detailed explanation ( Input/output format, Notes, Images )
Input Format:
The first line of input contains two integers, both separated by a single space denoting the length and breadth respectively.
Output Format:
The only line of output prints the area of the rectangle
Constraints:
1 <= L, B <= 10ˆ2
Sample Input 1:
4 20
Sample Output 1:
80
Explanation of Sample Input 1:
Length of the rectangle is 4 and breadth is 20. 
Hence the area of the rectangle is (length*breadth). 
So the answer is 4*20=80.
Approaches (1)
Brute-force Method

Take inputs of length and breadth in two variables l and b. Create a new variable area and store the area of rectangle(l*b) in it. Finally print the area.

Time Complexity
Space Complexity
Code Solution
(100% EXP penalty)
Find Area of Rectangle
Full screen
Console