import java.io.*; import java.util.Arrays; /** * Arrays.sort() 也可以对 String 排序 */ public class Main { public static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); public static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out)); public static StreamTokenizer cin = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in))); public static PrintWriter cout = new PrintWriter(new OutputStreamWriter(System.out)); public static void main(String[] args) throws Exception { String[] s = new String[3]; for (int i = 0; i < 3; i++) { cin.nextToken(); s[i] = cin.sval; } Arrays.sort(s); for (String str : s) { cout.println(str); } cout.flush(); } }
0.0分
0 人评分
A+B for Input-Output Practice (III) (C语言代码)浏览:652 |
C二级辅导-分段函数 (C语言代码)浏览:912 |
C二级辅导-计负均正 (C语言代码)浏览:698 |
打水问题 (C语言代码)浏览:1148 |
C语言程序设计教程(第三版)课后习题8.9 (C语言代码)浏览:897 |
2^k进制数 (C语言描述,蓝桥杯)浏览:1457 |
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:654 |
C二级辅导-计负均正 (C语言代码)浏览:523 |
DNA (C语言代码)浏览:837 |
Pascal三角 (C语言代码)浏览:707 |