Write a program in java to input length and breadth of a rectangle and find the area of rectangle
Answers
Answered by
5
import java.util.Scanner;
class rect
{
public static void main (String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the length and breadth of the rectangle");
int l=sc.nextInt();
int b=sc.nextInt();
int a=2*(l+b);
System.out.println("Area of the rectangle="+a);
}
}
class rect
{
public static void main (String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the length and breadth of the rectangle");
int l=sc.nextInt();
int b=sc.nextInt();
int a=2*(l+b);
System.out.println("Area of the rectangle="+a);
}
}
Similar questions