public class Main {
public static void main(String[] args) {
Lee lee=new Lee();
int l1=lee.LeeInt("Ïngrese lado 1 del rectangulo: ");
int l2=lee.LeeInt("Ïngrese lado 2 del rectangulo: ");
lee.Imp("El perimetro es:"+ l1*2+l2*2, true);
lee.Imp("El area es:"+ l1*l2, true);
}
}
import java.io.*; class Lee{ BufferedReader buf; void ini(){ buf=new BufferedReader (new InputStreamReader(System.in)); } int LeeInt(String msg)throws IOException{ int aux; System.out.print(msg+"\t"+":"); aux=Integer.parseInt(buf.readLine()); return aux; } double LeeDou(String msg)throws IOException{ double aux; System.out.print(msg+"\t"+":"); aux=Double.parseDouble(buf.readLine()); return aux; } String LeeStr(String msg)throws IOException{ String aux; System.out.print(msg+"\t"+":"); aux=(buf.readLine()); return aux; } boolean LeeBool(String msg)throws IOException{ boolean aux; System.out.print(msg+"\t"+":"); aux=Boolean.parseBoolean(buf.readLine()); return aux; } short LeeSho(String msg)throws IOException{ short aux; System.out.print(msg+"\t"+":"); aux=Short.parseShort(buf.readLine()); return aux; } long LeeLon(String msg)throws IOException{ long aux; System.out.print(msg+"\t"+":"); aux=Long.parseLong(buf.readLine()); return aux; } byte LeeByt(String msg)throws IOException{ byte aux; System.out.print(msg+"\t"+":"); aux=Byte.parseByte(buf.readLine()); return aux; } void Imp(String msg, boolean ln){ if(ln)System.out.println(msg); else System.out.print(msg); } }public class Main { public static void main(String[] args) { Lee lee=new Lee(); int l1=lee.LeeInt("Ïngrese lado 1 del rectangulo: "); int l2=lee.LeeInt("Ïngrese lado 2 del rectangulo: "); lee.Imp("El perimetro es:"+ l1*2+l2*2, true); lee.Imp("El area es:"+ l1*l2, true); } }