最简洁,没有之一,将一个字符串str的内容颠倒过来,并输出。str的长度不超过100个字符。 摘要:解题思路:注意事项:就是迭代器调换位置,注意包含头文件参考代码:#include<iostream>#include <cstring>#include <stdlib.h>#include <alg…… 题解列表 2024年06月14日 0 点赞 0 评论 277 浏览 评分:9.9
二级C语言-计算素数和,差点被坑了 摘要:解题思路:输入,判断是否大于1,写函数,输出注意事项:1既不是质数也不是合数;参考代码:#include<iostream> #include <vector> #include <stdbool…… 题解列表 2024年06月14日 0 点赞 0 评论 256 浏览 评分:9.9
编写题解 2834: 与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int n,m,s=0; cin>>n;int a[n];fo…… 题解列表 2024年06月14日 0 点赞 0 评论 410 浏览 评分:0.0
主打简洁,学生数量N占一行每个学生的学号、姓名、三科成绩占一行,空格分开。 摘要:解题思路:接上题,只需要加工一下就行了注意事项:初始化不赋值的元素参考代码:#include#include using namespace std; typedef struct Student{…… 题解列表 2024年06月13日 0 点赞 0 评论 345 浏览 评分:9.9
主打简洁,现有有N个学生的数据记录,每个记录包括学号、姓名、三科成绩 摘要:解题思路:输入,开辟存储空间,输入,输出注意事项:注意struct里的string类型不可以使用malloc开辟,需要new创建,所以结构体这里使用了数组,而不是string;参考代码:#includ…… 题解列表 2024年06月13日 0 点赞 0 评论 362 浏览 评分:9.9
考察经典Switch语句的用法 摘要:解题思路:考察经典Switch语句的用法注意事项:注意switch语句是先找到符合项才继续执行的,时间久了,有点忘了参考代码:#include<iostream> using namespace s…… 题解列表 2024年06月13日 1 点赞 0 评论 307 浏览 评分:9.9
1131斐波那契数列(动态规划) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[50]; arr[1] = 1; arr[2] = 1…… 题解列表 2024年06月13日 0 点赞 0 评论 324 浏览 评分:0.0
1130数数字(for循环遍历) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){ char s[100]; cin >…… 题解列表 2024年06月13日 0 点赞 0 评论 376 浏览 评分:0.0
1129排序问题(2)(sort排序) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;bool compare(int p1, int p2)…… 题解列表 2024年06月13日 0 点赞 0 评论 249 浏览 评分:0.0
1128排序问题(1)(sort排序) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;bool compare(int p1, int p2)…… 题解列表 2024年06月13日 0 点赞 0 评论 399 浏览 评分:0.0