Math, asked by FGFGY, 10 months ago

Write a java program to enter the area and breadth of rectangle and calculate its length and perimeter

Answers

Answered by Anonymous
4

import java.util.*;

public class Length_Perimeter

{

public static void main(String args[])

{

Scanner in =new Scanner(System.in);

float a,l,b,p;

System.out.println("Enter the area and breadth");

a=in.nextFloat();

b=in.nextFloat();

l=a/b;

p=2*(l+b);

System.out.println("The length is"+l);

System.out.println("The perimeter is"+p);

}

}

Similar questions