奖学金 (C语言代码) 摘要:解题思路: 选择排序注意事项: 注意最后输出的是5个 参考代码: //代码写的比较烂,请谅解#include <stdio.h> int main() { …… 题解列表 2019年05月06日 2 点赞 1 评论 1154 浏览 评分:9.1
奖学金 (Python代码) 这道题笔者就直接定义了数据类型grade,然后按题意定义了大小顺序并写出了排序。然后排序就完了。其实说不定直接冒泡求前五还快一点?```pythonclassgrade:def__init__(self,o,c,m,e):self.o=oself.c=cself.t=c+m+edefcompare(g 题解列表 2019年08月26日 0 点赞 0 评论 2679 浏览 评分:5.3
奖学金-题解(C语言代码)-------简单粗暴AC #includestructstu{intxuehao,a,b,c,sum;};intmain(){structstua[2000];intn,i,j,k;scanf("%d",&n);for(i=0;i 题解列表 2019年11月17日 0 点赞 0 评论 1926 浏览 评分:9.5
奖学金-题解(C++代码)(结构体排序做的) 将学号和各科成绩及总分五项数据项做成一个结构体,对结构体对象进行排序先写结构体:```cpptypedefstruct{intxuehao;intyuwen;intshuxue;intyingyu;intsum;}student;```利用了sort函数来排序结构体对象, 题解列表 2019年11月17日 0 点赞 0 评论 1840 浏览 评分:5.2
奖学金-题解(C语言代码) 容易理解的思路:我跑了三遍的冒泡排序,第一遍是为了将总分从高到低进行排列;第二遍是为了将语文分从高到低进行排序;第三遍是将总分和语文分相等,按照学号从小到大排列。切记不能用一遍冒泡来连续比较总分,语文分,以及学号。因为冒泡算法虽然能把数列给遍历一遍,但是它只能比较两个相邻的数据的大小,不能跨越比较。 题解列表 2019年12月18日 0 点赞 0 评论 1975 浏览 评分:8.7
1106-奖学金-题解(C语言代码)ACACACAC 摘要: 大概就是:结构体+排序 emmmm,话不多说,上代码 ```c #include int main() { int n,x=1; scanf("%d",&n); struct…… 题解列表 2020年01月26日 0 点赞 0 评论 1636 浏览 评分:9.6
奖学金-题解(Java代码),冒泡排序,干就完了! staticvoid_1106奖学金(){intlen=scanner.nextInt();int[]yu=newint[len];int[]sum=newint[len];int[]id=newint[len];for(inti=0;i 题解列表 2020年02月23日 0 点赞 0 评论 1123 浏览 评分:0.0
奖学金-题解(C语言代码) 排名前五的学生可以获得奖学金,先比较总分、比较语文分数、比较学号;输出前五个人的学号和总分。#includetypedefstruct//定义学生信息结构体,存储学号、成绩{intnumber;intchinese;intmath;intenglish;intsum;}student;intmain( 题解列表 2020年04月07日 0 点赞 0 评论 1235 浏览 评分:0.0
奖学金-题解(Java代码) ```javapublicstaticclassStudentimplementsComparable{inta;intb;intc;inttotal;intflag;@OverridepublicintcompareTo(Studento){//TODOAuto-generatedmethodstu 题解列表 2020年04月14日 0 点赞 0 评论 1201 浏览 评分:0.0
奖学金-题解(C语言代码) #include#includetypedefstructstuinfo{intid;intlanguage_score;intmath_score;intenglish_score;intsun_score;structstuinfo*next;}STU;STU*chushihua(intnum, 题解列表 2020年05月01日 0 点赞 0 评论 1179 浏览 评分:6.0