三个数求最大值——三目运算符 摘要:解题思路:用三目运算符求最大值可以避免if嵌套表达式1?表达式2:表达式3;先执行表达式1,如果表达式1的结果如果为真,那么执行表达式2,并且这个整体的运算式的结果是表达式2的结果;如果表达式1的结果…… 题解列表 2024年04月04日 0 点赞 0 评论 265 浏览 评分:0.0
自定义函数之数字后移 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void houyi(int *a,int n,int m){ int i,j,t,q,b[20];…… 题解列表 2024年04月04日 0 点赞 0 评论 164 浏览 评分:0.0
C语言密码编译—putchar 摘要:参考代码:#include<stdio.h> int main() { char c1 = 'C', c2 = 'h', c3 = 'i', c4…… 题解列表 2024年04月04日 0 点赞 0 评论 185 浏览 评分:0.0
C语言温度转换题解 摘要:参考代码:#include<stdio.h> int main() { float c, F; scanf("%f", &F); c = 5*(F - 32) / 9; printf("c…… 题解列表 2024年04月04日 0 点赞 0 评论 295 浏览 评分:0.0
计算球体积胡扯版 摘要:解题思路:先看一眼别人的答案注意事项:记得球的体积是三分之四派啊的平方参考代码:#include<stdio.h>#define PI 3.1415926int main(){ float r,…… 题解列表 2024年04月05日 2 点赞 0 评论 258 浏览 评分:0.0
[编程入门]C语言循环移位 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { unsigned int a, n; // 读取输入的两个正整数 sc…… 题解列表 2024年04月05日 0 点赞 0 评论 179 浏览 评分:0.0
循环练习之完美数判断 摘要:#include <stdio.h> // 函数用于判断一个数字是否是完美数 int isPerfect(int num) { int sum = 0; // 初始化因子之和为0 …… 题解列表 2024年04月05日 0 点赞 0 评论 257 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-子串简写 摘要:解题思路:分别记录首字母和尾字母出现的位置,然后遍历数组得出结果。注意事项:降低时间复杂度,不走回头路,时间复杂度由O(n2)降为O(n)。参考代码:#include<stdio.h…… 题解列表 2024年04月05日 0 点赞 0 评论 374 浏览 评分:0.0
1022: [编程入门]筛选N以内的素数 摘要:解题思路:注意事项:参考代码:import math N = int(input()) arr = [True] * (N + 1) for i in range(2, int(math.sqr…… 题解列表 2024年04月05日 0 点赞 0 评论 227 浏览 评分:0.0
这是一个题解 摘要:#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int n; scanf("%d", &n)…… 题解列表 2024年04月05日 0 点赞 0 评论 217 浏览 评分:0.0