#include<stdio.h>
int main()
{
int i, m, n;
double sum, item;
scanf("%d %d", &m, &n);
sum = 0;
for(i=m; i<=n; i++){
item = i*i+1.0/i;
sum = sum+item;
}
printf("sum = %.6f", sum);
return 0;
}
标签:平方,倒数,int,sum,序列,习题 From: https://www.cnblogs.com/ytmsnzy/p/16587873.html