新手写求和问题(c++) 摘要:解题思路:利用三个循环来控制三种类型求和注意事项:利用fixed<<setprecision(2)来设置精度参考代码:#include<iostream>#include<iomanip>using …… 题解列表 2024年11月08日 1 点赞 0 评论 150 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,i,s1=0,s2=0; double c,s3=0…… 题解列表 2024年11月13日 0 点赞 0 评论 240 浏览 评分:0.0
题解 1015: [编程入门]求和训练(最基础的方法) 摘要:解题思路:最简单的方法,简单易懂注意事项:平方和,倒数的表示参考代码:a,b,c = map(int,input().split()) suma = 0 sumb = 0 sumc = 0 f…… 题解列表 2024年11月14日 2 点赞 0 评论 278 浏览 评分:10.0
灭有感情,全是for//和数学题解//(C语言 摘要:解题思路:for的自增设定注意事项:注释那里可直接代替前个for参考代码:#include<stdio.h>int main(){ int a,b,c,i; float sum1=0,sum2=0,s…… 题解列表 2024年11月26日 2 点赞 0 评论 466 浏览 评分:0.0
6行代码解决求和训练 摘要:解题思路:注意事项:参考代码:a, b, c = map(int, input().split())A = sum(range(1, a+1)) # 计算1到a的自然数之和B = sum([i**2…… 题解列表 2024年12月08日 0 点赞 2 评论 311 浏览 评分:9.9
编写题解 1015: [编程入门]求和训练 文章 > 编写题解 摘要:解题思路:注意事项:注意最后输出时要保留两位小数,sum3+=1 . 0/i时1需要+.0参考代码:#include<bits/stdc++.h>using namespace std;i…… 题解列表 2025年01月10日 0 点赞 0 评论 184 浏览 评分:0.0
编写题解 1015: [编程入门]求和训练python 摘要:参考代码:a,b,c=map(int,input().split())s1=0s2=0s3=0for i in range(1,a+1): s1+=ifor i in ran…… 题解列表 2025年01月12日 0 点赞 0 评论 103 浏览 评分:0.0
1015: [编程入门]求和训练 摘要:解题思路:注意事项:参考代码:def oa(i): fxa=0 while i!=0: fxa…… 题解列表 2025年01月20日 0 点赞 0 评论 217 浏览 评分:0.0