No title

 


import java.util.*;


public class Rectangle {

    public static void main(String[] args) {

        double length, width , area , perimeter;

        Scanner sc = new Scanner(System.in);


    

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

         length = sc.nextDouble(); 

        

     

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

         width = sc.nextDouble(); 

        

    

         perimeter = 2 * (length + width);

        

        

         area = length * width;


        

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


        System.out.println("The perimeter of the Rectangle is: " + perimeter);


        scanner.close(); 

    }

}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !