参考代码:
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scanner=new Scanner(System.in); String Str1[]=scanner.nextLine().split(" "); String Str2=""; for (int i = 0; i < Str1.length; i++) { if (Str2.length()<Str1[i].length()) { Str2=Str1[i]; } } System.out.println(Str2); } }
0.0分
2 人评分
C二级辅导-进制转换 (C语言代码)浏览:514 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:1121 |
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:632 |
奖学金 (C++代码)浏览:2008 |
C语言训练-数字母 (C语言代码)浏览:585 |
C语言程序设计教程(第三版)课后习题11.1 (C语言代码)浏览:633 |
C语言程序设计教程(第三版)课后习题10.5 (C语言代码)浏览:1448 |
c primer plus 第十二章 12.1小节浏览:377 |
拆分位数 (C语言代码)浏览:1327 |
成绩转换 (C语言代码)浏览:1006 |