请帮我看看,我实在弄不出来,谢谢
#include<stdio.h>#include<math.h>
double fun(int n,double k)
{double i=1;double s=1;
for (i=1;i<=n;i++)
s+= pow(i,k);return s;}
void main()
{
int n,k;
double s;
printf("请输入他们的值:");
scanf("%d,%d",&n,&k);
s=fun(n,k);
printf("s=%d",s);
}