慕移动6052691
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>bool isMod2(int n){ //被3/5/7 除余数均为2 if( (n%3 == 2) && (n%5 == 2) && (n%7 ==2) ) return true; else return false;}int main(){ int count = 1; int n = 500; while(count <= 50) { if( isMod2(n) ) { printf("被3、5、7除均为2,第%d个数它是:%d\n",count,n); count++; } n++; } system("pause"); }