import java.util.Scanner;





public class testscanner {

 /**

  * @parm args 

  */

 public static void main(String[] args)  {

  int nextValue;

  int sum = 0;

  Scanner sr = new Scanner(System.in);

  sr.useDelimiter("\\s");

  while(sr.hasNext()){

   nextValue = sr.nextInt();

   sum += nextValue;

  }

  

  System.out.println("Sum: "+ sum);

  sr.close();

  

}



} 
posted on 2016-03-28 20:26  14软一王元浩  阅读(123)  评论(0编辑  收藏  举报