三、程序流程图
四、代码实现
#include<bits/stdc++.h> using namespace std; main() { long n, sum, i; while(scanf("%ld", &n)!=EOF) { printf("ÔÚ1-%ldÖ®¼äµÄ½×ÌÝÊýΪ£º\n", n); 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("ÔÚ1-%ldÖ®¼ä£¬ÓÐ%ld¸öÊý¿ÉÒÔÂú×ã°®Òò˹̹¶Ô½×ÌݵÄÒªÇó¡£\n", n, sum); } }
标签:std,-%,ld,sum,5.21,打卡 From: https://www.cnblogs.com/binglinll/p/17418220.html