题解 1015: [编程入门]求和训练

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

用列表来求和

摘要:解题思路:把公式分成三个部分,每 个部分单独计算,最后求和注意事项:参考代码:a,b,c = map(int,input().split())suma = []sumb = []sumc = []fo……

用自定义函数来解决

摘要:解题思路:注意事项:参考代码:a,b,c = map(int,input().split())def sumhe(a,b,c):    suma = 0    sumb = 0    sumc = 0……

[编程入门]求和训练;使用一个循环求和

摘要:解题思路:找出三个数中的最大值,然后循环最大的那一个循环,使用判断来决定是否需要计入求和参考代码:#include <stdio.h> // 求以下三数的和,保留2位小数 1~a之和 1~b的平……

1015: [编程入门]求和训练

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    double a,b,c,d=0,e=0,f=0,Sn……

[编程入门]求和训练

摘要:解题思路:注意事项:参考代码:a,b,c = map(int,input().split())sum_1 = 0sum_2 = 0sum_3 = 0for i in range(1,a+1):    ……

[编程入门]求和训练

摘要:```python a,b,c = map(int,input().split()) seq_a = [i for i in range(1,a+1)] seq_b = [i**2 for ……

[编程入门]求和训练

摘要:参考代码:#include<stdio.h> #include<math.h> int main() { int a,b,c; int a1=0,b1=0; float c1=0,s……

编程入门]求和训练

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(void){    int A = 0, B = 0;    float C = 0;    int a, b, c;……