代码 

 1 import java.util.Scanner;
 2 public class ComputeArea {
 3 public static void main(String[] args) {
 4 Scanner input = new Scanner(System.in);
 5 System.out.print("Enter a number for radius: ");
 6 double radius = input.nextDouble();
 7 double area;
 8 area = radius * radius * 3.14159;
 9 System.out.println("The area for the circle of radius " + radius + " is " + area);
10 }
11 
12 }

 

相关文章:

  • 2022-12-23
  • 2019-08-30
  • 2021-06-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2021-06-14
  • 2022-12-23
  • 2021-08-07
  • 2021-04-13
相关资源
相似解决方案