题解列表

筛选

优质题解

1238: 演讲大赛评分(C++解析)

代码解析:定义了一个Player结构体,包含选手的姓名和分数列表。然后,定义了一个calculateAverageScore函数,用于计算选手的平均分。函数中,首先将选手的分数列表复制到一个新的列表sortedScores中。然后,使用max_element和min_element函数找到列表中的最高

多组输入的循环方式解决

摘要:解题思路:注意事项:参考代码:#define  _CRT_SECURE_NO_WARNINGS#include<stdio.h>int main() { int n; scanf("%d", &n);……

画矩形(思路简单)

摘要:解题思路:注意事项:根据条件写代码参考代码:#include <stdio.h>int main(){    int x,y,c,n;    scanf("%d %d %c %d",&x,&y,&c,……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>typedef struct student{    int id;    int score;  ……

与7无关的数

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){    int n,t=0,s=0;    scanf("%d",&n);    for(int i=1;i<=……
优质题解

去掉空格(C语言 精简!)

摘要:解题思路:    利用gets()返回值(非0为真)作为while循环条件解决多行输出问题利用指针变量p对字符串进行遍历,到\0停止遍历注意事项: *++p!=&#39;\0&#39;  是先执行++……

1113: C语言考试练习题_保留字母

##题目1113:C语言考试练习题_保留字母**解题思路:输入一个字符串,一个个判断是否为字母,如果符合条件就输出**```cpp#includeusingnamespacestd;intmain(){chara[1000];cin>>a;intn=strlen(a);for(inti=0;i='a'

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h> typedef struct num{     int real;     int imag;  ……