这个函数的调用怎么弄呢?
#include <stdio.h>#include <windows.h>
#include <conio.h>
#define M 100
int main()
{
int ALL[M];
system("pause");
return 0;
}
void dev_fun(int ALL[M],int i,int m,int n)
{
for(i=1;i<=200;i++)
{
m=i%7;
n=i%13;
if(m==0||n==0)
{
ALL[M]=i;
printf("%d",ALL[M]);
}
}
}
这道题是用一个函数算出200以内能被7或者13整除的数,并把这些数放在主函数的数组内,我编了个函数求解,不过在主函数中怎么调用,并打印出来呢








程序代码:
,还有一点不懂...在自定义的那个foo函数中,当i=7时,size原值0不是经过自加变成1了吗?也就是arr【1】=7;为什么打印输出的时候是arr【0】=7呢?
下面是我的两个想法,还请大牛帮我解惑