cyt涛
cyt涛
全部文章
分类
归档
标签
去牛客网
登录
/
注册
cyt涛的博客
全部文章
(共31篇)
题解 | #统计字符串中子串出现的次数#
#include <iostream> #include <cstring> using namespace std; int main() { char str[100] = { 0 }; char substr[100] = { 0 }; c...
2023-03-09
0
276
题解 | #编写函数实现两数交换(指针方式)#
#include <iostream> using namespace std; // write your code here...... void swap(int *m,int* n) { int temp=*m; *m=*n; *n=temp; } ...
2023-03-08
0
318
题解 | #比较字符串大小#
#include <iostream> using namespace std; int mystrcmp(const char* src, const char* dst); int main() { char s1[100] = { 0 }; char s2[1...
2023-03-08
0
365
题解 | #创建二维动态数组#
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; // write your code here...... int **a=new int*[n];...
2023-03-08
0
285
题解 | #数组元素处理#
#include <iostream> using namespace std; void func(int* p, int n); int main() { int arr[6] = { 0 }; for (int i = 0; i < 6; i++) { ...
2023-03-08
0
352
题解 | #创建动态数组#
#include <iostream> using namespace std; int main() { int n; cin >> n; // write your code here...... int* ptr=new i...
2023-03-08
0
291
题解 | #复制部分字符串#
#include <iostream> #include <string> using namespace std; int main() { char str[30] = { 0 }; cin.getline(str, sizeof(str)); ...
2023-03-08
0
304
题解 | #获取字符串长度#
#include <iostream> using namespace std; int main() { char str[100] = { 0 }; cin.getline(str, sizeof(str)); // write your code he...
2023-03-08
0
291
题解 | #利用指针遍历数组#
#include <iostream> using namespace std; int main() { int arr[6] = { 0 }; int* ptr = arr; int len = sizeof(arr) / sizeof(int); ...
2023-03-08
0
276
题解 | #结构体简单使用#
#include <iostream> #include <string> using namespace std; struct student { // write your code here...... string name; int ag...
2023-03-08
0
247
首页
上一页
1
2
3
4
下一页
末页