为什么这样写会错误?
查看原帖
为什么这样写会错误?
862015
Hatcher123楼主2022/11/14 20:56
import java.util.Scanner;

class main {
    public static void main(String args[]) throws Exception {

        int w = 0;
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        int h = scanner.nextInt();
        int e = scanner.nextInt();

        w = (int)(t * 0.2 + h * 0.3 + e * 0.5);
        System.out.println(w);
      }
}
2022/11/14 20:56
加载中...