#include<stdio.h>
#include<math.h>
int main()
{
int i, n;
double sum, item;
scanf("%d", &n);
sum=0;
for(i=1; i<=n; i++){
item = sqrt(i);
sum = sum+item;
}
printf("sum = %.2f",sum);
return 0;
}
标签:main,int,double,sum,序列,习题,include,平方根
来源: https://www.cnblogs.com/ytmsnzy/p/16587881.html