1.

Write a java program to find the area of a rectangle​

Answer»

Answer:

import java.util.*;

class area{

   public static void MAIN() {

       Scanner SC = NEW Scanner(System.in);

       

       System.out.println("PLEASE enter length of rectangle:");

       double length = sc.nextDouble();

       

       System.out.println("Please enter breadth of rectangle:");

       double breadth = sc.nextDouble();

       

       double area = length*breadth;

       

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

   }

}

//Hope this helps! If it does, please mark it brainliest! THANKS :D



Discussion

No Comment Found