吃桃问题(逆向思维找突破) 摘要:解题思路:注意事项:当N=1时,a应该=1所以i应该=i-1参考代码:#include<stdio.h>int main(){ int a=1,N; scanf("%d",&N); …… 题解列表 2022年10月24日 0 点赞 0 评论 416 浏览 评分:0.0
题目 1029: [编程入门]自定义函数处理素数—常规求解方法 摘要:解题思路:for循环注意事项:统计因子的个数的变量a需要在for循环前初始化参考代码:#include<stdio.h> int main(void) { int i, n,a=0; …… 题解列表 2022年10月24日 0 点赞 0 评论 378 浏览 评分:0.0
编写题解 1045: [编程入门]自定义函数之整数处理 摘要: #include int main() { int a[10]; int i,min=0,max=0; for(i=0…… 题解列表 2022年10月24日 0 点赞 0 评论 361 浏览 评分:0.0
求平均值,并输出大于平均值的个数 摘要:解题思路:构建一个数组,存储输入的数据,并计算平均值,再次循环求大于平均值的个数注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ in…… 题解列表 2022年10月24日 0 点赞 0 评论 481 浏览 评分:7.2
将多位数拆解为单位数,善用整除和求余 摘要:解题思路:注意事项:参考代码:n=input()u=0##for _ in n:## print('_:',_)## if int(_)%2!=0:## u=u…… 题解列表 2022年10月24日 0 点赞 0 评论 462 浏览 评分:0.0
题解 1126: C语言训练-字符串正反连接 按题要求建新串 摘要:解题思路: 用两个数组存放字符串,再用新数组连接起来 注意事项: 参考代码: #include #include int main() { …… 题解列表 2022年10月24日 0 点赞 0 评论 771 浏览 评分:9.9
编写题解 2929: 网线主管 摘要:解题思路:定义一个函数用来计算绳子数量,只需要假设最后的输出结果是x,然后采用二分法计算出x的最大值注意事项:此函数的使用条件是在整数的时候,也就是把小数化成了整数,然后采用二分法,这里如何+-1是比…… 题解列表 2022年10月24日 0 点赞 0 评论 501 浏览 评分:0.0
成绩等级字母输出c语言 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int x; scanf("%d",&x); switch(x/10) { case 10: case 9…… 题解列表 2022年10月24日 0 点赞 0 评论 423 浏览 评分:0.0
题目 1025: [编程入门]数组插入处理—常规求解方法 摘要:解题思路:for循环注意事项:考虑到等于的情况,等于情况下欲插入的数j放在后面参考代码:#include<stdio.h> int main(void) { int arr[10], i,…… 题解列表 2022年10月24日 0 点赞 0 评论 492 浏览 评分:9.9
阶乘公式求职(c++)(怀氏) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;double fact(double n) {…… 题解列表 2022年10月24日 0 点赞 0 评论 456 浏览 评分:9.9