package zengliang;import java.util.*;public class Suv {public static void main(String[] args) {// TODO 自动生成的方法存根try{double r,s;final double PI = 3.14;Scanner sc=new Scanner(System.in);System.out.println("输入圆的半径:");r = sc.nextDouble();s = PI*r*r;System.out.println("面积为:"+s);}catch(Exception e){System.out.println("半径不能为字符!");}finally{System.out.println("运行结束");}}}
转载于:https://www.cnblogs.com/watch269397682/p/10843514.html