日志6
累加
#include <iostream>
#include<cmath>
using namespace std;
int main()
{
double a,b,c,d=0,e=0,f=0;//数据要初始化
cin >> a>>b>>c;
for (int i = 1; i <= a; i++) {
d += i;
}
for (int o = 1; o <= b; o++) {
e += o*o;
}
for (double p = 1; p <= c; p++) {
f += 1/p;//p要为浮点型数据
}
printf("%.2f", d + e + f);
return 0;
}