多方法求阶乘(迭代、递归) 摘要:思路:本题考的非常简单,就是自定义一个函数,然后求阶乘的倒数之和。而求阶乘有两种方法,第一种是:使用迭代求阶乘(for循环);第二种使用递归来求阶乘。 注意事项:注意数据类型,题目涉及到小数,使…… 题解列表 2022年10月24日 0 点赞 0 评论 413 浏览 评分:9.9
Hello, world!(怀氏c++) 摘要:解题思路:把数字转换成ASCI码值,就是对应的char类型值注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; …… 题解列表 2022年10月24日 0 点赞 0 评论 299 浏览 评分:9.9
A+B for Input-Output Practice (II)(怀氏c++) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,a,b,i; cin>>n; for(i…… 题解列表 2022年10月24日 0 点赞 0 评论 809 浏览 评分:9.9
作为第一个题解我很荣幸 摘要:解题思路:利用getline可以正常输入空格注意事项:注意i和i-1参考代码:c++:#include <bits/stdc++.h>using namespace std;/*inline int …… 题解列表 2022年10月24日 0 点赞 0 评论 509 浏览 评分:9.9
A+B for Input-Output Practice (III)(怀氏c++) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(1) { …… 题解列表 2022年10月24日 0 点赞 0 评论 529 浏览 评分:9.9
作为第二个题解我也很荣幸哦嘻嘻 摘要:解题思路:gets输入字符串,然后通过比较注意事项:300+300,我直接1000,啥也不怕参考代码:#include#includeint main() { char s[1000]; …… 题解列表 2022年10月24日 0 点赞 4 评论 638 浏览 评分:9.9
A+B for Input-Output Practice (IV)(怀氏c++) 摘要:解题思路:4(5)开头就是就前4(5)个数的和,用两个循环解决注意事项:参考代码:#include<bits/stdc++.h>using namespace std; int main(){ …… 题解列表 2022年10月24日 0 点赞 1 评论 360 浏览 评分:9.9
A+B for Input-Output Practice (V)(怀氏c++) 摘要:解题思路:注意事项:注意给的数字,从头之后都是1+2+3+4+。。。。+head;用for循环累加即可参考代码: #include <iostream>using namespace std;int…… 题解列表 2022年10月25日 0 点赞 0 评论 443 浏览 评分:9.9
A+B for Input-Output Practice (VI)(怀氏c++) 摘要: #include <iostream> using namespace std; int main () { int n; while (cin>>n){ in…… 题解列表 2022年10月25日 0 点赞 0 评论 266 浏览 评分:9.9
A+B for Input-Output Practice (VII)(怀氏C++) 摘要:#include<iostream> using namespace std; int main() { int a,b; while(cin>>a>>b) cou…… 题解列表 2022年10月25日 0 点赞 0 评论 238 浏览 评分:9.9