旺仔烧麦
旺仔烧麦
全部文章
分类
归档
标签
去牛客网
登录
/
注册
旺仔烧麦的博客
TA的专栏
46篇文章
0人订阅
C/C++题解
46篇文章
60人学习
全部文章
(共69篇)
题解 | this->的应用 | 点和圆的关系
来自专栏
#include <iostream> using namespace std; // 点类 class Pointer { private: int x; // x 坐标 int y; // y 坐标 public: ...
2026-01-09
0
32
题解 | 设计立方体类
来自专栏
#include <iostream> using namespace std; class Cube { private: int length; int width; int height; public: ...
2026-01-09
0
28
题解 | 类的应用 | 比较长方形的面积大小
来自专栏
#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
34
题解 | 编写函数实现字符串翻转(引用方式)
来自专栏
#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
30
题解 | 引用;引用和指针实现的区别;编写函数实现两数交换(引用方式)
来自专栏
#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
37
题解 | 递归-斐波那契数列 | 不死神兔问题
来自专栏
#include <iostream> using namespace std; int getSum(int n); int main() { int n; cin >> n; cout << getSum(n) <<...
2026-01-09
0
24
题解 | 递归的实现 | 函数实现计算一个数的阶乘
来自专栏
#include <iostream> using namespace std; long long factorial(int n); int main() { int n; cin >> n; cout << factorial...
2026-01-09
0
60
题解 | String重载的用法 | 使用字符函数统计字符串中各类型字符的个数
来自专栏
#include <cctype> #include <iostream> #include <string> using namespace std; int main() { string str; getline(cin, str); ...
2026-01-09
0
50
题解 | 统计字符串中子串出现的次数
来自专栏
#include <iostream> #include <cstring> using namespace std; int main() { char str[100] = { 0 }; char substr[100] = { 0 }; c...
2026-01-08
0
36
题解 | 数组元素处理
来自专栏
#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
28
首页
上一页
1
2
3
4
5
6
7
下一页
末页