[编程入门]有规律的数列求和-题解(C语言代码)经验交流 摘要:#include int main() { int N,a=1,t; float sum=0,x=1.0,y=2.0; scanf("%d",&N); while(…… 题解列表 2019年11月05日 0 点赞 0 评论 463 浏览 评分:0.0
[编程入门]有规律的数列求和-题解(C语言代码) 摘要:个人做法 #include int main() { int n,t; double a=1.0,b=…… 题解列表 2019年11月06日 0 点赞 0 评论 394 浏览 评分:0.0
[编程入门]有规律的数列求和-题解(C语言代码)值得参考 摘要: #include int main() { double a=2,b=1,ans=0,m; int n,i,j,k; scanf("%d…… 题解列表 2019年11月11日 0 点赞 0 评论 797 浏览 评分:9.3
[编程入门]有规律的数列求和-题解(C语言代码) 摘要:#include void main() {double a=2,b=1,t,n,s=0; scanf("%lf",&n); while(n>0){ s=s+a/b; t=a+b; b…… 题解列表 2019年11月11日 0 点赞 0 评论 531 浏览 评分:6.0
[编程入门]有规律的数列求和-题解(C语言代码) 摘要:根据算式:知道后一项的分子等一前一项分子加分母; 后一项的分母为前一项的分子; ```c #include int main() { double n…… 题解列表 2019年11月15日 0 点赞 1 评论 1053 浏览 评分:9.9
[编程入门]有规律的数列求和-题解(Java代码) 摘要:保留小数点后边两位小数的方法(下边的 c 表示要处理的数据): 第一种: DecimalFormat df = new DecimalFormat("#.00"); String …… 题解列表 2019年11月21日 0 点赞 0 评论 942 浏览 评分:9.3
[编程入门]有规律的数列求和-题解(Python代码)emmmm 摘要:```python sum=t=0 #定义变量 fz=2 #第一项的分子 fm=1 #第一项的分母 n = int(input()) #输入 for i in range(1…… 题解列表 2019年11月21日 0 点赞 1 评论 1500 浏览 评分:9.9
有规律的数列求和-(Python代码) 摘要:只用三个变量,f1,f2保存中间值 ```python n = int(input()) sum = 0 f1, f2= 1, 2 for i in range(1, n+1): …… 题解列表 2019年11月22日 0 点赞 0 评论 923 浏览 评分:0.0
[编程入门]有规律的数列求和-题解(Python代码) 摘要:代码如下: n=int(input("")) a=1;a1=2;a2=a+a1 b=2;b1=3;b2=b+b1 s=0.0 s=b/a+b1/a1 …… 题解列表 2019年11月23日 0 点赞 1 评论 456 浏览 评分:5.5
[编程入门]有规律的数列求和 (C++代码) 摘要:```cpp #include #include #include using namespace std; int main() { int n; scanf("%d",&n);…… 题解列表 2019年11月23日 0 点赞 0 评论 693 浏览 评分:2.0