本帖最后由 HM周一帆 于 2013-4-5 20:20 编辑
- import java.util.Scanner;
- public class Test7 {
-
- public static void main(String[] args) {
- //System.out.println(args[0]);
- //System.out.println(args[1]);
- System.out.println("请输入2个整数");
- Scanner sc= new Scanner(System.in);
- int i = sc.nextInt();
- int j = sc.nextInt();
- System.out.println("结果是 "+ (double)(i / j));
- }
- }
复制代码 结果是0.0 忘记除法怎么算了 |