Can be obtained within 1-200 divisible 7 or 13, the number of those on the array defined main function, and print out the number of
#include<iostream>
using namespace std;
int dev_fun(int a[])
{
int m,count=0;
for(int i=1;i<=200;i++)
{
if((i%7==0)||(i%13==0))
{
a[m++]=i;
}
}
return m;
}
main()
{
int a[45],l;
l=dev_fun(a);
for(int i=0;i<l;i++)
{
printf("%-4d",a[i]);
if((i+1)%5 == 0) //使输出时每行五个数
printf("\n");
}
}