input LENGTH AND BREADTH - FIND AREA (JAVA)
import java.util.*;
class Area1
{
public static void main(String arr[])
{
Scanner sc=new Scanner(System.in);
float l,b,a,p;
System.out.println("Enter the length:");
l=sc.nextFloat();
System.out.println("Enter the breadth:");
b=sc.nextFloat();
a=l*b;
p=2*(l+b);
System.out.println("Area="+a);
System.out.println("Perimeter="+p);
}
}
Comments
Post a Comment
If you have any doubts, Feel free to Ask !