Write a program to input length (l) and breadth (d). Compute and print the area of
rectangle.
Answers
Answered by
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
English,
1 day ago
Hindi,
2 days ago
Math,
2 days ago
Computer Science,
8 months ago
Political Science,
8 months ago
Computer Science,
8 months ago