📄 mathcalc.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 + -