Rectangle Plot (Operators & Math)
Read the width and height of a rectangle. Print its area on the first line and its perimeter on the second.
Input: Two integers w h.
Output: Area, then perimeter, each on its own line.
Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Area = w × h, perimeter = 2 × (w + h).