138785376 java技术交流群 火热招人中,欢迎大家加入,期待你的光临
public class MaoPaoSort {
public static void main(String[] args) {
try {
int mp[] = new int[args.length];
for (int i = 0; i < args.length; i++) {
mp[i] = Integer.parseInt(args[i]);
}
for (int i = 0; i < mp.length; i++) {
for (int j = 0; j < mp.length; j++) {
int temp;
if (mp[i] < mp[j]) {
temp = mp[j];mp[j] = mp[i];mp[i] = temp;
}
}
}
for (int i = 0; i < mp.length; i++) {
System.out.print(mp[i] + " ");
}
System.out.print("\n");
System.out.println("你的名字");
System.out.println("你的班级");
System.out.println("你的学号");
} catch (Exception e) {
System.out.println("没有传递参数或者参数类型不正确!请按照规则输入参数!程序退出...");
}
}
}