class Main { public static void main(String[] args) { double a=8; double b=16; double perimeter=(a+b)*2; double area=a*b; System.out.println("矩形的周长是:"+perimeter+"米"); System.out.println("矩形的面积是:"+area+"平方米"); } }