题解列表

筛选

三目运算整数大小比较

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

编写题解 2774: 计算三角形面积

摘要:解题思路:注意事项: 定义成double类型是全对,定义成float类型是64分,所以要用double类型。参考代码:#include<stdio.h>#include<math.h>int main……

水仙花数简单理解版

摘要:解题思路:理清题意,水仙花数是三位数的注意事项:太简单了参考代码:for i in range(100,999):    a = (i//100)    b =(i//10)%10    c = i%……

鲲兔同笼问题代码超简单

摘要:解题思路:将脚的数除于2再减去头的数量可得兔子的数量,将头数减去兔子数可得鲲数。注意事项:参考代码:#include<stdio.h>int main(){    int x,y;    scanf(……

二级C语言-计算素数和

摘要:解题思路: 本题主要是解决自定义的函数问题。第一:输入范围m,nscanf("%d%d",&m,&n);第二:利用for循环,从m到n依次检查是否为素数;第三自定义一个函数(关键)    if(x<=……

陶陶摘苹果(简单版)

摘要:解题思路:直接循环加遍历就OK,没有那么难注意事项:参考代码:#include<stdio.h>int main(){    int a[10];    int b;    int i;    for……

直方图(数组版)

摘要:解题思路:很简单就是一个简单的数组元素统计的一个题目,因此我们可以创建两个数组来解决,一个用来输入我们的元素,另一个用来保存我们要记录的0到fmax的元素。 #include int m……

简短易懂的

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){     char a; while ((a = getchar()) != EOF) { if (a == ……

成绩排序c语言

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h> struct student{    char name[200];    int age; ……