To find the area of a rectangle. Formula : Area of rectangle= length x breadth. in java cod e
Answers
Answered by
0
Answer:
import java.util.Scanner;
class AreaOfRectangle {
public static void main (String[] args)
{
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the length of Rectangle:");
double length = scanner.nextDouble();
System.out.println("Enter the width of Rectangle:");
double width = scanner.nextDouble();
//Area = length*width;
double area = length*width;
System.out.println("Area of Rectangle is:"+area);
}
}
Similar questions
Chemistry,
3 hours ago
Social Sciences,
3 hours ago
Chemistry,
3 hours ago
Math,
5 hours ago
Social Sciences,
5 hours ago
Hindi,
8 months ago
Geography,
8 months ago