#include<stdio.h>
int main()
{
int m;
float sum=0.0,j;
printf("请输入一个数M:\n");
scanf("%d",&m);
for(j=5.0;j<=(m+5);j++)
sum+=1/j;
printf("结果是:%f\n",sum);
return 0;
}
#include<stdio.h>
int main()
{
int m;
float sum=0.0,j;
printf("请输入一个数M:\n");
scanf("%d",&m);
for(j=5.0;j<=(m+5);j++)
sum+=1/j;
printf("结果是:%f\n",sum);
return 0;
}