The area can be defined as the amount of space covered by a flat surface of a particular shape.
formula = length * breadth
import java.util.Scanner;
public class AreaRectangle {
public static void main(String[] args) {
int length,breadth,area=0;
Scanner sc = new Scanner(System.in);
System.out.println("Enter Length of Rectangle : ");
length= sc.nextInt();
System.out.println("Enter Length of Rectangle : ");
breadth= sc.nextInt();
area = length*breadth;
System.out.println("Area of Rectangle " +area);
}
}
Comments
Post a Comment