package m.j.j; import java.util.Scanner; public class Ree { public static void main(String[] args) { String[] a = new String[1000]; int i, n = 0; Scanner scan = new Scanner(System.in); a = new String[]{scan.nextLine()}; for (i = 0; i < a.length; i++) { if (!a[i].equals(" ")&&!a[i].equals("\0")) { n++; System.out.println(n);} } } }
统计单词长度(求指正)
最新推荐文章于 2024-09-01 15:30:33 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)