Computer Science, asked by waseemkayani1895, 2 days ago

Write a program to input length (l) and breadth (d). Compute and print the area of
rectangle.

Answers

Answered by ry6635440
2

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 area of the rectangle is " + (a*b));

   }

}

Similar questions