标签:ted ring next void 空格 can public ati static
import java.util.Scanner; public class hello { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in=new Scanner(System.in); int i=in.nextInt(); int j=0,w=0; while(i!=-1) { if(i%2==0) { w++; } else { j++; } i=in.nextInt(); } System.out.println("偶数"+w+"个,奇数"+j+"个"); } }
标签:ted ring next void 空格 can public ati static
原文地址:http://www.cnblogs.com/bcd589/p/6067801.html