缩位求和C++非递归写法 摘要:解题思路:思路很简单,难点就是要读懂题和清楚字符串与数字相互转换的语法。1 接收字符串S。2 建立循环,循环内容是: 1 将字符串的每一个值都转换为数字并相加得到sum。2 sum转换为新的字符串S。…… 题解列表 2023年02月23日 0 点赞 0 评论 377 浏览 评分:9.9
嗨嗨!我又来了昂!!!! 摘要:```cpp #include using namespace std; int kunkun(int x){//判断素数 if(x==1) { return 0; } i…… 题解列表 2023年02月23日 0 点赞 0 评论 702 浏览 评分:9.9
排列序数(c++)超短 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<cstring>using namespace std;int main(){…… 题解列表 2023年02月23日 0 点赞 0 评论 375 浏览 评分:9.9
1012: [编程入门]字符串分类统计 摘要:```cpp #include #include #include using namespace std; /* 题目描述 编写一函数,由实参传来一个字符串,统计此字符串中字母、数…… 题解列表 2023年02月23日 0 点赞 1 评论 727 浏览 评分:9.9
031: [编程入门]自定义函数之字符串反转 摘要:```cpp #include #include #include using namespace std; // 写一函数,使输入的一个字符串按反序存放, // 在主函数中输入并输出反序…… 题解列表 2023年02月23日 0 点赞 1 评论 362 浏览 评分:9.9
1196: 去掉空格 摘要:#这个代码是适配一次性输入的代码,对于dev或者vs等运行环境一行一行输入的话可能会出现输入一次转换一次的问题,稍微改进即可。 ```cpp #include #include #includ…… 题解列表 2023年02月23日 0 点赞 1 评论 282 浏览 评分:9.9
1042: [编程入门]电报加密 摘要:#此题和上一题类似,也需要接收空格,同时还需要进行字母加密,难度稍高。 ```cpp #include #include #include using namespace std; /…… 题解列表 2023年02月23日 0 点赞 1 评论 348 浏览 评分:9.9
编写题解 2788: 晶晶赴约会 摘要:解题思路:用if语句借此题注意事项:只是1,3,5输出No,6,7也输出yes参考代码:#include<iostream>using namespace std;int main(){ int…… 题解列表 2023年02月23日 0 点赞 0 评论 316 浏览 评分:9.9
自由下落的距离计算 好理解的思路(C语言) 摘要:解题思路:由题目知,该题要运用等比数列,an=a1*q^(n-1),Sn=a1(1-q^n)/(1-q),先假设高度为1米,a1=1,q=0.5,要求第n次下落后再弹起的高度,也就是第a(n+1)项,…… 题解列表 2023年02月23日 0 点赞 1 评论 342 浏览 评分:9.9
简单点有规律的数列求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float n=2.0,z=1.0; float s=0; int N; scanf("…… 题解列表 2023年02月23日 0 点赞 0 评论 263 浏览 评分:9.9