003-001-005
Arithmetic Operators: Rectangle Area Calculation
Easy
Problem Description
Arithmetic Operators: Rectangle Area Calculation
In this problem, you will create a program that reads height and width as input, calculates the area (height × width) and perimeter (2 × (height + width)) using the multiplication operator (*), and displays the result to standard output.
Learning Objective: Learn calculation using multiplication operator (*)
Create a program that calculates the area and perimeter of a rectangle from its height and width.
Input
Line 1: Height (integer)
Line 2: Width (integer)
Output
Area: [area]
Perimeter: [perimeter]
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up