[编程入门]自定义函数之字符串连接 摘要:解题思路:直接相加即可注意事项:头文件#include#includeusing namespace std;void func(string n,string m){ cout<<n+m;}int…… 题解列表 2023年05月16日 0 点赞 0 评论 449 浏览 评分:0.0
简单求三个数最大值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){ //判断大小 return a>b?a:b; //使用条件运算符:如果a>b…… 题解列表 2023年05月16日 0 点赞 0 评论 397 浏览 评分:0.0
数字处理与判断1099 摘要:解题思路:将输入的整数变为字符串,用<string.h>里的strlen()计算该字符串的位数; 2.用for循环输出单个字符;注意事项:for循环中的循环次数=strle…… 题解列表 2023年05月16日 0 点赞 0 评论 344 浏览 评分:0.0
题目 1171: 蟠桃记解答 摘要:解题思路:a[n]=2*(a[n]+1)注意事项:别忘了if(n==1) result=1;这两行!参考代码:#includeusing namespace std; int f(int n){ …… 题解列表 2023年05月17日 0 点赞 0 评论 425 浏览 评分:0.0
题目 1172: 计算两点间的距离解答 摘要:解题思路:(x1-x2)^2+(y1-y2)^2=d^2注意事项:参考代码:#include<iostream>#include<cstdio>#include<cmath>using namespa…… 题解列表 2023年05月17日 0 点赞 0 评论 419 浏览 评分:0.0
利用指针修改相应的地址实现字符逆序 摘要:#include <stdio.h>#include <string.h>void interchange(char *i,char *j);int main(){ char str[100];…… 题解列表 2023年05月17日 0 点赞 0 评论 435 浏览 评分:0.0
不重复的输出数(新手题解) 摘要:解题思路:记录数组中的最大值,记录每个数字的出现次数,输出时从1到最大值遍历,次数大于0则输出注意事项:参考代码:#include<stdio.h>int c[99999]={0},d[99999];…… 题解列表 2023年05月17日 0 点赞 0 评论 512 浏览 评分:0.0
枚举法 列出所有的可能 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d,e,f; for(a=0…… 题解列表 2023年05月17日 0 点赞 0 评论 437 浏览 评分:0.0
简单计算机器实现 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b; char c; cin>…… 题解列表 2023年05月17日 0 点赞 0 评论 363 浏览 评分:0.0
双层循环,冒泡排序,然后减去等于d 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h> int main() { int i,j,k; int temp; int …… 题解列表 2023年05月17日 0 点赞 0 评论 418 浏览 评分:0.0