问题:
算法设计:
直接暴力查找;运用多个判断语句即可
源代码:
#include<stdio.h>
int main()
{
long n,sum,i;
while(scanf("%ld",&n)!=EOF)
{
sum=0;
for(i=7;i<=n;i++)
if(i%7==0)
if(i%6==5)
if(i%5==4)
if(i%3==2)
{
sum++;
printf("%ld\n",i);
}
printf("有%ld个数满足",sum);
}
}
标签:ld,15,sum,printf,打卡,i% From: https://www.cnblogs.com/ykznlxx/p/17378679.html