摘要: 题目描述:输入一系列整数,将其中最大的数挑出,并将剩下的数进行排序。输入:输入第一行包括1个整数N,1 2 3 int main(){ 4 int n; 5 int i,j; 6 int temp; 7 int a[1000]; 8 while(scanf("%d",&n) != EOF){ 9 for(i = 0; i 1){13 for(i = 1;i a[j]){16 temp = a[j-1];17 a[j-1] = a[... 阅读全文
posted @ 2013-09-15 21:06 ShirleySweet 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 有N个学生的数据,将学生数据按成绩高低排序,如果成绩相同则按姓名字符的字母序排序,如果姓名的字母序也相同则按照学生的年龄排序,并输出N个学生排序后的信息。输入: 测试数据有多组,每组输入第一行有一个整数N(N 2 #include 3 #include 4 5 struct stu{ 6 char name[101]; 7 int age; 8 int score; 9 };10 11 int main(){12 int n;13 int i, j;14 struct stu a[1000], temp;15 while... 阅读全文
posted @ 2013-09-15 16:05 ShirleySweet 阅读(300) 评论(0) 推荐(0) 编辑