डाउनलोड पी.डी.एफ. ई-बुक्स
Core Java - Area Of Rectangle

विवरण :

कोई विवरण नहीं है |


सोर्स कोड :

import java.util.Scanner;

public class Rectangle
{
public static void main(String args[])
{
int l, b;
double area;

System.out.println("Enter length of rectangle : ");
Scanner enter = new Scanner(System.in);
l = enter.nextInt();

System.out.println("Enter breadth of rectangle : ");
Scanner enter = new Scanner(System.in);
b = enter.nextInt();

area = l * b;

System.out.println("Area of Rectangle : " + area);
}
}

आउटपुट :

Enter length of rectangle : 
4
Enter breadth of rectangle : 
6
Area of Rectangle : 24.0