Computer Science, asked by junerana, 1 year ago

calculate the area of a rectangle in JAVA

Please help me doing this Program
immediately needed.....

I will Mark him or her as the brainliest !!!

Attachments:

Answers

Answered by satapathyaradhana46
0
these are the processes which can be used to calculate area of a rectangle in JAVA .
Attachments:

junerana: Please can u solve it in a simple way?
Answered by siddhartharao77
1

import java.util.Scanner;

class Calculate

{

public static void main(String args[])

{

int l,b, Area;

Scanner demo = new Scanner(System.in);

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

l = demo.nextInt();

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

b = demo.nextInt();

System.out.println(" ");

Area = l * b;

System.out.println("Area is : " +Area);

}

}


Output:

Enter length of the rectangle : 100

Enter breadth of the rectangle : 200.

Area is  : 20000.



Hope this helps!

Similar questions