public class zuoye_01 {
public static void main(String[] args) {
System.out.println("请输入英语片段,以点结束");
Scanner scanner = new Scanner(System.in);
String str = "";
int dc = 0;
while(scanner.hasNext())
{
str = scanner.next();
dc++;
System.out.println(str);
if (str.contains("."))
{
break;
}
}
System.out.println("单词总数是" +dc);
}
}
wm8888
相关分类