Java
Lois_δ
这个作者很懒,什么都没留下…
展开
-
类型的转换
double 转换成 int Scanner in = new Scanner(System.in); int foot; double inch; System.out.println((int)((foot+inch/12)*0.3048*100)); int 转换成 double Scanner in = new Scanner(System.in); int foot; int inch; System.out.println((foot+inch/12.0)*0.3048); ...原创 2021-07-20 17:20:12 · 149 阅读 · 0 评论 -
输入输出相同
package hello; import java.util.Scanner; public class Hello { public static void main(String[] args) { Scanner in =new Scanner(System.in); System.out.println(in.nextLine()); } }原创 2021-07-20 16:55:17 · 331 阅读 · 0 评论