Question: Integer variables height and length are read from input, representing the height and the length of a rectangle, respectively. Assign recArea with the area of
Integer variables height and length are read from input, representing the height and the length of a rectangle, respectively. Assign recArea with the area of the rectangle.
Ex: If the input is then the output is:
Area:
Note: The area of a rectangle is calculated by multiplying the height and the length.
import java.util.Scanner;
public class RectangleMeasurements
public static void mainString args
Scanner scnr new Scanner
System.in;
int height;
int length;
int recarea;
height nextInt ;
length nextInt ;
Your code goes here
System.out.printlnArea: recArea;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
