C语言训练-求1+2!+3!+...+N!的和 (C语言代码) 摘要:解题思路:注意事项:要考虑 int 的使用范围 达到16后int 就保存不料了参考代码:#include<stdio.h>int main(){ int i,n; long long t=0,s=1;…… 题解列表 2019年04月20日 0 点赞 0 评论 761 浏览 评分:6.0
[编程入门]Sn的公式求和 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ long int i,sum=0,sn=0; int n; scanf("%d",&n); for(i=0; …… 题解列表 2019年04月20日 0 点赞 0 评论 791 浏览 评分:6.0
[编程入门]水仙花数判断 (C语言代码) 摘要:解题思路:三个变量 判断一下 yes就输出注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int a[5];int used[5];int …… 题解列表 2019年04月20日 0 点赞 0 评论 1351 浏览 评分:6.0
[编程入门]带参数宏定义练习 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define swep(x,y) t=x,x=y,y=tint main(){int a,b,t; scanf("%d %d",…… 题解列表 2019年04月22日 2 点赞 0 评论 1087 浏览 评分:6.0
C语言训练-计算1~N之间所有奇数之和 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ double …… 题解列表 2019年04月24日 0 点赞 0 评论 970 浏览 评分:6.0
汽水瓶 (C语言代码) 摘要:解题思路:此题最好建立一个数学模型,说白了就是列个表看出它的规律,剩下的就好解的多了。你拥有的空瓶能够换得的总瓶数剩下的空瓶101210311420521630731840......... …… 题解列表 2019年04月26日 2 点赞 0 评论 1436 浏览 评分:6.0
[编程入门]第一个HelloWorld程序! (C++代码) 摘要:解题思路: <<end //是换行;注意事项:参考代码:#include <iostream>using namespace std;int main(){ cout<<"********…… 题解列表 2019年04月29日 0 点赞 1 评论 876 浏览 评分:6.0
经典解法C语言训练-百钱百鸡问题 (C语言代码) 摘要:参考代码:#include<stdio.h>int main(void){ for (int i = 0; i <= 20; i++) //公鸡最多只能买20只 f…… 题解列表 2019年05月04日 1 点赞 0 评论 1044 浏览 评分:6.0
用新的方法完成这道成绩评定题 (C语言代码) 摘要:解题思路:字符加偏移量。 注意优质题解里用switch语句来做是很直观明了的,这里我就不多说了。我要说的是提供一种新的思路来解这题。 在这种等级判断中,主要依靠十位以上的数…… 题解列表 2019年05月09日 5 点赞 0 评论 1017 浏览 评分:6.0
C语言训练-素数问题 (C++代码) 摘要:解题思路:C++小菜鸡注意事项:参考代码:#include<iostream>using namespace std;int main(){ int x,y; cin>>x; y=x…… 题解列表 2019年05月04日 1 点赞 0 评论 956 浏览 评分:6.0