回复 12楼 ffbh
简单啊
你加个循环不就行了?
#include <stdio.h>
int main(int argc, char * argv [ ])
{
int m,n,s,temp;
while(scanf("%d%d",&m,&n) != EOF)
{
if(m>n)
{
temp = m;
m = n;
n = temp;
}
for(;m <= n;m++)
{
temp = m;
s = 0;
while(temp)
{
s += temp % 10;
temp = temp / 10;
}
if(m%7 == 0 || m%10 ==7 || s%7 ==0)
{
printf("%d ",m);
}
}
printf("\n");
}
return 0;
}