另一种思路来解决数字后移 摘要:解题思路:通过将数组复制到此数组后,打印对应位来解决注意事项:注意打印循环i的起始值,否则会写成数字前移。参考代码:#include <stdio.h>int main(){ int x, n;…… 题解列表 2022年10月05日 0 点赞 0 评论 337 浏览 评分:0.0
1034-自定义函数之数字分离 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;void sep(int n){ string s=to_s…… 题解列表 2022年10月05日 0 点赞 0 评论 357 浏览 评分:0.0
1033-自定义函数之字符提取 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std; string isY(string s){ string …… 题解列表 2022年10月05日 0 点赞 0 评论 371 浏览 评分:0.0
1033-自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;string con(string s1,string s2)…… 题解列表 2022年10月05日 0 点赞 0 评论 466 浏览 评分:0.0
1031-自定义函数之字符串反转 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<algorithm> using namespace std;string rev…… 题解列表 2022年10月05日 0 点赞 0 评论 376 浏览 评分:0.0
1030-二维数组的转置 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[3][3]; for(int i=0;i<3;i++) …… 题解列表 2022年10月05日 0 点赞 0 评论 368 浏览 评分:0.0
1029-自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;bool isPrime(int n){ bool flag=t…… 题解列表 2022年10月05日 0 点赞 0 评论 349 浏览 评分:0.0
1028-自定义函数求一元二次方程 语言:C++ 摘要:解题思路:注意事项:参考代码:#include#includeusing namespace std;void f1(int a,int b,int d) { int x1=(-b+sqrt(…… 题解列表 2022年10月05日 0 点赞 0 评论 499 浏览 评分:0.0
先这样再那样 摘要:```c #include int gcd(int m,int n){ return (m%n==0)?n:gcd(n,m%n); } int lcm(int m,int n){ …… 题解列表 2022年10月05日 0 点赞 0 评论 424 浏览 评分:0.0
Sn的公式求和 摘要:解题思路:递归注意事项:参考代码:#include <stdio.h> #include <math.h> int fun(int n){ // 使用递归得到每一项数字 if(n==1…… 题解列表 2022年10月05日 0 点赞 0 评论 373 浏览 评分:9.9