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 评论 887 浏览 评分:9.9
循环移位(基础) 摘要:解题思路: 循环就是转圈 建议画图理解注意事项: 无参考代码:#include<iostream> using namespace std; const int N=10010; unsig…… 题解列表 2023年09月10日 0 点赞 0 评论 636 浏览 评分:9.9
编写题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:利用strlen函数求出数组有效大小,即数字位数。再利用swich选择语句根据不同位数来进行输出注意事项:注意加上头文件#include<string.h>#include<iostream…… 题解列表 2023年09月09日 0 点赞 0 评论 608 浏览 评分:9.9
1157: 亲和数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int zys(int x){ int sum=0; for(int…… 题解列表 2023年09月09日 0 点赞 0 评论 488 浏览 评分:9.9
1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int wan(int x){ int sum=0; for(int…… 题解列表 2023年09月09日 0 点赞 0 评论 472 浏览 评分:0.0
☆☆☆数组模拟队列实现队列操作☆☆☆ 解题思路:使用数组模拟的思想来解题。定义一个数组来表示我们的队列,然后定义队头和队尾,一般来讲非循环队列队尾设置为-1,循环队列的队尾可以设置为0当进行插入操作时,只需队尾++即可,删除元素时只需让队头前移,判断是否为空可以看队头是否超过队尾即可判断统计当前元素个数, 题解列表 2023年09月08日 0 点赞 0 评论 880 浏览 评分:9.9
补码(或许明日太阳西下倦鸟已归时) 摘要:解题思路: 首位是符号位 1为负数 0为整数 负数补码为反码加一 整数补码为原码注意事项:字符串存储参考代码:#include<iostream> using n…… 题解列表 2023年09月08日 0 点赞 0 评论 620 浏览 评分:9.9
C++ 字符串分类统计 #include//这是个非常万能的头文件usingnamespacestd;intmain(){inty=0,s=0,k=0,q=0;?//需要声明四个为0的变量chara[200];gets(a);intl=strlen(a);for(inti=0;i='a'&&a 题解列表 2023年09月08日 0 点赞 0 评论 790 浏览 评分:7.3
取二进制第x位 摘要:解题思路:学算法就上acwing注意事项: 参考代码:#include<iostream> using namespace std; int a[5],n,sum=0; int main(voi…… 题解列表 2023年09月07日 0 点赞 0 评论 627 浏览 评分:9.9
C++ 阶乘(递归做法) #include;usingnamespacestd;longdigui(long);//先声明intmain(){longa,num=0;//声明变量cin>>a;//输入一个参数for(inti=1;i 题解列表 2023年09月06日 0 点赞 0 评论 668 浏览 评分:9.9