题解列表

筛选

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

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

三目运算整数大小比较

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

整型与布尔型的转换

摘要:解题思路:注意事项:c中没有直接的布尔型,不能直接用,所以要引入一个头文件或者用 _Bool 作为类型定义变量。参考代码:#include<stdio.h>#include<stdbool.h>int……

计算2的n次方

摘要:解题思路:使用数组去保存数据,这里用到的是高精度的知识注意事项:参考代码:#include<stdio.h>int main(){    int a[100000]={0};    int i;   ……

不给糖就捣蛋

摘要:解题思路:注意事项:注意第一个与最后一个的特殊情况就ok了。参考代码:#include<stdio.h>int main(){    long a[5],i;    for(i=0;i<5;i++) ……

C语言使用string库函数判断数字

摘要:解题思路:1.定义统计函数,传入字符串s2.定义全局变量3.在统计函数内定义两个变量c,l,C用来获取字符串的长度;i用来计数;使用isdigit函数来判断字符串中是否有数字存在,如果有则number……

链表合并(c语言)

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

python, 很简单

摘要:解题思路:注意事项:参考代码:print(&#39;**************************&#39;)print(&#39;Hello World!&#39;)print(&#39;**……