天天看点

Java作业 输入圆的半径计算输出圆的周长和面积

1 package text1;
 2 
 3 import java.util.Scanner;
 4 
 5 public class text11 {
 6 public static void main(String[] args){
 7     
 8     Scanner sc =new Scanner(System.in);
 9     
10     
11     System.out.print("输入圆的半径");
12     int a =sc.nextInt();
13     
14     
15     System.out.print("圆的周长是;"+a*2*3.14+"圆的面积是;"+a*a*3.14);
16     
17 }
18 }      

转载于:https://www.cnblogs.com/wangguoning/p/5864272.html