package src;
import
import
import
public class A {
public static void main(String[] args) {
int i = 1;
int sum = 0;
int a;
System.out.println("start");
while (i <= 5) {
i++;
a = MyInput.readInt();
sum += a; }
System.out.println("sum=" + sum);
}
}
class MyInput {
public static String readString() {
BufferedReader br = new BufferedReader(
new InputStreamReader(System.in), 1);
String string = " ";
try {
string = br.readLine();
} catch (IOException ex) {
System.out.println(ex);
}
return string;
}
public static int readInt() {
return Integer.parseInt(readString());
}
public static double readDouble() {
return Double.parseDouble(readString());
}
}
改成这样就可以了