1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h> //注意:代码中用到 sqrt(开平方)需添加头文件<math.h>#define S(a,b…… 题解列表 2023年11月24日 0 点赞 0 评论 104 浏览 评分:0.0
素数问题(C语言代码)易理解版 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int i=0; for(int j=2;j<n;j++){…… 题解列表 2023年11月24日 1 点赞 0 评论 629 浏览 评分:0.0
筛选N以内的素数(C语言代码)(埃氏筛选法) 摘要:解题思路:埃拉托斯特尼筛法 ,简称 埃氏筛 ,也称 素数筛 。注意事项:用来找出一定范围内所有的素数。 所使用的原理是从2开始,将每个素数的各个倍数,标记成合数。 一个素数的各个倍数,是一个差为此素数…… 题解列表 2023年11月24日 0 点赞 0 评论 264 浏览 评分:0.0
a+b测试多组数据,要用到while 摘要:解题思路:因为是测试多组数据,所以要用到while注意事项:要打牢基础scanf("输入模式",地址列表);//输入语句及其格式。注:数据地址列表一定要加取地址符号&,如:&a a为数据变量;例…… 题解列表 2023年11月24日 0 点赞 0 评论 154 浏览 评分:0.0
用if else语句。设置一个中间变量用来对比3变量的大小 摘要:解题思路:用if else语句。设置一个中间变量用来对比3变量的大小注意事项:if else 语句的格式与写法 //所有程序在英文环境下写入printf("%d",n); n前要有一个逗…… 题解列表 2023年11月24日 0 点赞 0 评论 117 浏览 评分:0.0
同因查找(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ for(int i=10;i<1000;i++){ if(i%2==0&&i%3==0&&i%7==0) p…… 题解列表 2023年11月24日 0 点赞 0 评论 125 浏览 评分:0.0
为什么我写的这么简单1 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<algorithm>using namespace std;int a[1111],b[1111],c[1111],d…… 题解列表 2023年11月24日 0 点赞 0 评论 215 浏览 评分:0.0
1003密码破译 摘要:解题思路:字符+4操作/*要将"China"译成密码,译码规律是:用原来字母后面的第4个字母代替原来的字母.例如,字母"A"后面第4个字母是"E"."E"代替"A"。因此,"China"应译为"Glm…… 题解列表 2023年11月24日 0 点赞 0 评论 279 浏览 评分:0.0
运用strtok函数和动态分配函数解决 摘要:参考代码:#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { char str[5000]; ch…… 题解列表 2023年11月24日 0 点赞 0 评论 215 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:注意事项:参考代码:def leap(year): if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: …… 题解列表 2023年11月24日 0 点赞 0 评论 131 浏览 评分:0.0