Computer Science, asked by FalakLayeeque, 2 days ago

write a program to enter length and breadth of a rectangle and calculate and display area and perimeter of the rectangle.​

Answers

Answered by ry6635440
3

import java.util.*;

public class program1

{

   public static void main(String args[])

   {

       Scanner scr = new Scanner(System.in);

       double a,b;

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

       a = scr.nextDouble();

       System.out.println("Enter the breath of the rectangle");

       b = scr.nextDouble();

       System.out.println("The perimeter of the rectangle is " + (2*(a+b)));

       System.out.println("The area of the rectangle is " + (a*b));

   }

}

Answered by AAYANISRAIL
1

Answer:

chlo time mil gya meko

hello kese ho

Similar questions