import java.io.*;
public class Consdelnput {
public static void main (String args[]){
int data;
int sum=0;
System.out.println("Enter an int value");
data=MyInput.readInt();
while (data!=0){
sum+=data;
System.out.println("Enter an int value,the program exits if the input is 0");
data =MyInput.readInt();}
System.out.println("The sum is "+sum);}}
class MyInput{
public static String readString(){
BufferedReader br=new BufferedReader (new InputStreamReader(System.in),1);
int k;
float x,y;
String studentname="WangXin";
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());
}
}
import java.io.*;public class Consdelnput { public static void main (String args[]){ int data; int sum=0; System.out.println("Enter an int value"); data=MyInput.readInt(); while (data!=0){