#define N 1000
#include"stdio.h"
main()
{
int sum;
sum=fun(7);
printf("%d以内所有%d的倍数之和为:%d\n",N,7,sum);
getch();
yzj();
}
int fun(int m)
{int i,sum=0;
for(i=1;i
return sum;
}
yzj()
{
FILE *IN,*OUT;
int n;
int i[10];
int o;
OUT=fopen("out.dat","w");
if(OUT==NULL)
{printf("Write File Error");
}
o = fun(6);
fprintf(OUT,"%d\n",o);
fclose(IN); //没见着要打开啥文件哈
fclose(OUT);
}