import java.util.*;
class Rectangle
{
public static void main(String args[])
{
float l,b,area,peri;
Scanner sc = new Scanner(System.in);
System.out.println("For Rectangle:");
System.out.println("Enter length:");
l=sc.nextFloat();
System.out.println("Enter breadth:");
b=sc.nextFloat();
area1=l*b;
peri=2*(l+b);
System.out.println("The area of rectangle="+area);
System.out.println("The periemter of rectangle="+peri);
}
}
class Rectangle
{
public static void main(String args[])
{
float l,b,area,peri;
Scanner sc = new Scanner(System.in);
System.out.println("For Rectangle:");
System.out.println("Enter length:");
l=sc.nextFloat();
System.out.println("Enter breadth:");
b=sc.nextFloat();
area1=l*b;
peri=2*(l+b);
System.out.println("The area of rectangle="+area);
System.out.println("The periemter of rectangle="+peri);
}
}
No comments :
Post a Comment