import java.util.Scanner;class Blank { public static void main(String[] args) { // TODO Auto-generated method stubScanner B=new Scanner(System.in);String str=B.nextLine();int p=0;int i=0;while(B.hasNext()&&!str.equals("EOF")){ for(i=0;i<str.length();i++){ if(str.charAt(i)==' ') ++p; } str=B.nextLine();}System.out.println(p); }}
添加回答
举报
0/150
提交
取消