题解列表

筛选

各位大神看看我那错了

#includeusingnamespacestd;/*runthisprogramusingtheconsolepauseroraddyourowngetch,system("pause")orinputloop*/intmain(intargc,

奖学金-题解(C++代码)(结构体排序做的)

将学号和各科成绩及总分五项数据项做成一个结构体,对结构体对象进行排序先写结构体:```cpptypedefstruct{intxuehao;intyuwen;intshuxue;intyingyu;intsum;}student;​```利用了sort函数来排序结构体对象,

汽水瓶-题解(C语言代码)

要注意当只剩两个空瓶是可以向老板再借一瓶。此时需要在最终结果上再加一以下是参考代码#includeintmain(){intn,i,j,k,cnt;while(scanf("%d",&n),n!=0){cnt=0;if(n=3){n-=3;n+=1;cnt++;if(n==2){cnt++;break