public class L_S{
public static void main(String args[]){
double a=0.0,b=0.0;
if(args.length==1)
a=b=Integer.parseInt(args[0]);
if(args.length>1)
{a=Integer.parseInt(args[0]);
b=Integer.parseInt(args[1]);
}
Rectangle f=new Rectangle(a,b);
f.l_s();
}
}class Rectangle{
private double width,heigth;
Rectangle (double i,double j){
width=i;
heigth=j;
}
public void l_s(){
double l,s;
l=2*(width+heigth);
s=width*heigth;
System.out.println("l="+l+"\0s");
}
}
public static void main(String args[]){
double a=0.0,b=0.0;
if(args.length==1)
a=b=Integer.parseInt(args[0]);
if(args.length>1)
{a=Integer.parseInt(args[0]);
b=Integer.parseInt(args[1]);
}
Rectangle f=new Rectangle(a,b);
f.l_s();
}
}class Rectangle{
private double width,heigth;
Rectangle (double i,double j){
width=i;
heigth=j;
}
public void l_s(){
double l,s;
l=2*(width+heigth);
s=width*heigth;
System.out.println("l="+l+"\0s");
}
}
public static void main(String args[]){
//double a,b;
int a=0,b=0;
if(args.length==1)
a=b=Integer.parseInt(args[0]);
if(args.length>1)//ags改为args
{a=Integer.parseInt(args[0]);
b=Integer.parseInt(args[1]);
}
Rectangle f=new Rectangle(a,b);
f.l_s();
}}class Rectangle{
private int width,heigth;
Rectangle (int i,int j){
width=i;
heigth=i;
}
public void l_s(){
double l,s;
l=2*(width+heigth);
s=width*heigth;
System.out.println("l="+l+"\0s");
}
}