0

尝试运行我的基本 java 代码时,我不断收到此错误。它编译时完全没有错误,但由于某种原因程序实际上不会运行。我正在使用文本板。这是我的代码。

/*
*TrudiHw.java
*Trudi Farrell
*19/10/15
*/

import java.util.Scanner;
public class TrudiHw{
    public static void main (String args[]){
    int input;
    int answer;

    Scanner keyboard;

    keyboard = new Scanner(System.in);

    System.out.println("How many students are attendting the trip?");
    input = keyboard.nextInt();

    answer = input/5;

    System.out.println("The amount of cars you will need is " +answer);

    }
}
4

0 回答 0