旺仔烧麦
旺仔烧麦
全部文章
分类
归档
标签
去牛客网
登录
/
注册
旺仔烧麦的博客
TA的专栏
46篇文章
0人订阅
C/C++题解
46篇文章
26人学习
全部文章
(共67篇)
题解 | 类的应用 | 比较长方形的面积大小
来自专栏
#include<bits/stdc++.h> using namespace std; class rectangle{ private: int length,width; public: void set(int x,int y){ length=x; wi...
2026-01-09
0
10
题解 | 编写函数实现字符串翻转(引用方式)
来自专栏
#include<bits/stdc++.h> #include <cstring> using namespace std; // write your code here...... void strback(string& x){ for(int i=x...
2026-01-09
0
12
题解 | 引用;引用和指针实现的区别;编写函数实现两数交换(引用方式)
来自专栏
#include <iostream> using namespace std; // write your code here...... void myswap(int& x, int& y){ int temp = x; x = y; y ...
2026-01-09
0
15
题解 | 递归-斐波那契数列 | 不死神兔问题
来自专栏
#include <iostream> using namespace std; int getSum(int n); int main() { int n; cin >> n; cout << getSum(n) <<...
2026-01-09
0
8
题解 | 递归的实现 | 函数实现计算一个数的阶乘
来自专栏
#include <iostream> using namespace std; long long factorial(int n); int main() { int n; cin >> n; cout << factorial...
2026-01-09
0
26
题解 | String重载的用法 | 使用字符函数统计字符串中各类型字符的个数
来自专栏
#include <cctype> #include <iostream> #include <string> using namespace std; int main() { string str; getline(cin, str); ...
2026-01-09
0
17
题解 | 统计字符串中子串出现的次数
来自专栏
#include <iostream> #include <cstring> using namespace std; int main() { char str[100] = { 0 }; char substr[100] = { 0 }; c...
2026-01-08
0
16
题解 | 数组元素处理
来自专栏
#include <iostream> using namespace std; void func(int* p, int n); int main() { int arr[6] = { 0 }; for (int i = 0; i < 6; i++) { ...
2026-01-08
0
11
题解 | 比较字符串大小
来自专栏
#include <iostream> using namespace std; int mystrcmp(const char* src, const char* dst); int main() { char s1[100] = { 0 }; char s2[1...
2026-01-08
0
16
题解 | 创建动态数组
来自专栏
#include <iostream> using namespace std; int main() { int n; cin >> n; // write your code here...... int * p = new ...
2026-01-08
0
17
首页
上一页
1
2
3
4
5
6
7
下一页
末页