⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mathcalc.java

📁 Java2入门经典第二章源码
💻 JAVA
字号:
public class MathCalc 
{
  public static void main(String[] args) 
  {
    // Calculate the radius of a circle
    // which has an area of 100 square feet
    double radius = 0.0;
    double circleArea = 100.0;
    int feet = 0;
    int inches = 0;
    radius = Math.sqrt(circleArea/Math.PI);
    feet = (int)Math.floor(radius);  // Get the whole feet and nothing but the feet
    inches = (int)Math.round(12.0*(radius - feet));
    System.out.println("The radius of a circle with area " + circleArea +
                      " square feet is\n " + feet + " feet " + inches + " inches");
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -