Write a program in Java to accept the length and breadth of a using parameter and rectangle from
the
and find its area and perimeter
Answers
Answered by
0
Answer:
import java.util.*;
import java.io.*;
class AreaPerimeter
{
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);
}
}
Answered by
0
Answer:
perimeter hota hae
Explanation:
parameter ni hansinxnsjs jxmxmamlala
Similar questions