Computer Science, asked by Abhi2608a, 8 months ago

Write a java script board to enter the length and breadth of a rectangal and find out it's area and perimeter

Answers

Answered by SanjuR
1

Answer:

import java.util.Scanner;

class AreaOfRectangle {

  public static void main (String[] args)

  {

   Scanner scanner = new Scanner(System.in);

   System.out.println("Enter the length of Rectangle:");

   double length = scanner.nextDouble();

   System.out.println("Enter the width of Rectangle:");

   double width = scanner.nextDouble();

   //Area = length*width;

   double area = length*width;

   System.out.println("Area of Rectangle is:"+area);

Hope it helps...

Similar questions