Area of Rectangle
Practice this coding question on Coding Gurukul.
Problem statement
A community garden reserves a rectangular plot for new seedlings. The planner knows its whole-number length and width and needs its area. Your task Multiply the two side lengths to compute the area of the rectangle. Important details Length and width use the same unit, so the answer is in square units. Compute area rather than perimeter: adding the sides or doubling their sum answers a different question. Exchanging length and width does not change the result. A rectangle with either dimension zero has zero area. Print an exact integer, using a type wide enough for the product of the largest allowed dimensions. Worked example A plot of length 12 and width 7 covers 12 * 7 = 84 square units. A 0 by 7 plot has area 0.
Input format
One line contains length and width.
Output format
Print the rectangular area.
Constraints
0 <= length, width <= 1000000000.
Sample input
12 7
Sample output
84
Sign in to run or submit a solution in C++, Java or Python.