圆的周长是2 * pi * r
import java.io.BufferedReader; import java.io.IOException;/*来自 N o w J a v a . c o m - 时代Java*/ import java.io.InputStreamReader; public class Main { public static void main(String[] args) { int radius = 0; System.out.println("Please enter radius of a circle"); try { /** 时代Java公众号 **/ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); radius = Integer.parseInt(br.readLine()); }catch(NumberFormatException ne) { System.out.println("Invalid radius value" + ne); System.exit(0); } catch(IOException ioe) { System.out.println("IO Error :" + ioe);