1067: 二级C语言-分段函数(c++题解) 摘要:解题思路:x<0时求绝对值,x>=0并<2时求(x+1)的平方根,x>=2并<4时求(x+2)的5次方,否则求2x+5。注意事项:保留2位小数参考代码:#include <bits/stdc++.h>…… 题解列表 2023年09月10日 1 点赞 1 评论 694 浏览 评分:9.9
按位与(位运算)(菜鸟教程)(基础) 摘要: //按位与:按二进制位进行"与"(&)运算 1100+1111=1100 只有1&1=1,其他都是0;解题思路: 将第z到第y位进行(1<<i)得到1110000 与n进行按位与 …… 题解列表 2023年09月10日 0 点赞 0 评论 514 浏览 评分:6.0
水仙花数-for循环 摘要:解题思路:注意事项: 经历for循环之后n的值会变化参考代码: #include<iostream> using namespace std; int main() { i…… 题解列表 2023年09月10日 0 点赞 0 评论 355 浏览 评分:8.0
有规律的数列求和java 摘要: import java.util.Scanner; public class Main { public static void main(String[] args) { S…… 题解列表 2023年09月10日 0 点赞 0 评论 306 浏览 评分:0.0
C++ 温度换算 摘要:解题思路:注意事项: 简单编程,注意用float参考代码:#include<bits/stdc++.h> using namespace std; int main() {…… 题解列表 2023年09月10日 0 点赞 0 评论 461 浏览 评分:8.7
药房管理(循环收取各个人要的药品数量) 摘要:参考代码: ```c #include int main() { int m; scanf("%d",&m);//药品总量 int n; scanf("%d",&n);//取药…… 题解列表 2023年09月11日 0 点赞 0 评论 285 浏览 评分:0.0
津津的储蓄计划 摘要:注意事项: 只有交给母亲的整钱才加20%,别忘了到最后可以还有余钱,没成整的 参考代码: ```c #include int main() { int a,k,sum=0; dou…… 题解列表 2023年09月12日 0 点赞 0 评论 320 浏览 评分:0.0
C语言训练-角谷猜想(用do-while防止一开始a为1的情况) 摘要:注意事项: 这题我一看到就在想如果输入的数是1呢,这就显出do-while的效果了,先执行,后判断 参考代码: ```c #include int main() { int a,b,c…… 题解列表 2023年09月12日 0 点赞 0 评论 377 浏览 评分:0.0
C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; bool p; cin>>…… 题解列表 2023年09月12日 0 点赞 0 评论 355 浏览 评分:8.0
C++ 猴子偷逃问题 摘要: //整体思路:反向推理 #include using namespace std; int main() { int N;int s = 1;//表示桃子的数量 …… 题解列表 2023年09月12日 0 点赞 0 评论 349 浏览 评分:9.9