📄 appfloatinout.java
字号:
import java.io.*;
public class AppFloatInOut
{
public static void main(String args[])
{
System.out.println("Please input a float:");
try
{
BufferedReader k = new BufferedReader(new InputStreamReader(System.in));
String s = k.readLine();
float a = Float.parseFloat(s);
float d = a;
int b = (int)a;
float c=d-b;
System.out.println("The part of int is:" + b);
System.out.println("The part of float is:" + c);
}catch(IOException e) { }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -