import java.util.Scanner;
public class MianJi {
float PI =(float) 3.14;
void circle(float r){
System.out.println("圆的面积:" + r*r*PI);
}
void square(float a){
System.out.println("正方形的面积:" + a * a);
}
void rectangle(float b,float c){
System.out.println("长方形的面积:" + b * c);
}
@SuppressWarnings("resource")
public static void main(String[] args) {
MianJi mianJi = new MianJi();
Scanner sc = new Scanner(System.in);
System.out.print("请输入圆的半径:");
float r = sc.nextFloat();
mianJi.circle(r);
System.out.print("请输入正方形的边长:");
mianJi.square(sc.nextFloat());
System.out.print("请输入长方形的长:");
float chang = sc.nextFloat();
System.out.print("请输入长方形的宽:");
float kuan = sc.nextFloat();
mianJi.rectangle(chang, kuan);
}
}