编程实现,计算s的值,s=1+1/2+1/3+…+1/n,n由键盘输入,输出和s
#include<stdio.h>
void main(){
int n,i=1;long s=0;scanf("%d",&n);
for(i;i<=n;i++) s+=i*i;
printf("s=%ld\n",s);
}