FINDING RECTANGLE AREA AND PERIMETER - Carrier Study

Breaking

Home Top Ad

Responsive Ads Here

Friday, May 25, 2018

FINDING RECTANGLE AREA AND PERIMETER

class perrec
{
float l,b;
rectangle(float x, float y)
{
l=x;
b=y;
}
void cal()
{
system.out.println("area of rectangle :"+(l*b));
system.out.println("perimeter of rectangle :"+ (2*(l+b));
}
}
class rutest
{
public static void main(string args[])
{
rectangle or=new rectangle(22.f, 20.6f);
or.cal();
}
}

No comments:

Post a Comment