Rectangle Area
Easyjava
Store a rectangle's length and width in variables and print its area.
Input: two integers (length, then width), separated by whitespace.
Output: one line — the area (length x width).
Example 1
Input
5 3
Output
15
- 1 <= length, width <= 100000
Hint 1
Declare an int variable area = length * width;
Hint 2
Then print that variable.
Read both values into int variables, multiply into a variable, and print it. Note the hidden case 100000 x 100000 needs long, so a careful solution declares area as long.