Find
out the Area and Perimeter of a Rectangle whose sides are 10 & 15.
Solution :
class AR
{
public static void main(String args[])
{
int length = 10 ;
int breath = 15 ;
double area = length * breath ;
int Peri = 2 * (length + breath) ;
System.out.println(" The area of a rectangle is " +
area) ;
System.out.println(" The Perimeter of rectangle is " +
Peri) ;
}
}
No comments:
Post a Comment