Write a java program to find the area of the rectangle.
Program Code:
class AreaRect
{
public static void main(String args[])
{
int len,bre,area;
len= Integer.parseInt(args[0]);
bre=Integer.parseInt(args[1]);
area=len*bre;
System.out.println(“length of rectangle=”+len);
System.out.println(“breadth of rectangle=”+bre);
System.out.println(“area of rectangle=”+area);
}
}
Post A Comment:
0 comments: