主题:帮我看看哪里错了
帮我看看哪里错了
#include "stdio.h"
#include "math.h"
void main()
{int yinshuhe(int m,int n);
int m,n,i,k;
printf("please input jishu , yinshu and chushu:\n");
scanf("jishu=%d,yinshu=%d,chushu=%d",&m,&n,&i);
k=yinshuhe(m,n);
printf("yushu:%d",k%i);
}
int yinshuhe(int m,int n)
{
int sum=0,j=0,i,s=m;
for(i=1;i<n;i++)
s=s*m;
for(i=1;i<=s;i++)
if(s%i==0)
sum=sum+i;
return(sum);