moonweight.java
来自「两个java程序。PrintS.java 用冒泡排序的方法打印两个s三角镇的」· Java 代码 · 共 18 行
JAVA
18 行
//Moonweight 计算物体在月球上的重力(moonweight=earthweight*0.17)
import java.io.*;
public class Moonweight
{
public static void main(String args[])
{
double earthweight;
double moonweight;
try
{
System.out.print("Input the weight in the earth:");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
earthweight=(double)Integer.parseInt(br.readLine());
moonweight=earthweight*0.17;
System.out.println("The weitht in the moon is"+moonweight);
}catch(IOException e){}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?