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 124, then the output is:
Area: 48
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 main(String[] args){
Scanner scnr = new Scanner(
System.in);
int height;
int length;
int recarea;
height =5cnr* nextInt () ;
length =5cnr. nextInt () ;
V** Your code goes here */
System.out.println("Area: "+ recArea);
}
}
 Integer variables height and length are read from input, representing the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!