1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
using namespace std;
void main()
{
int a,b,c;
int num,nummax;
cout< <"请输入3个整数,系统将自动排除可以被这些数整除的数!\n";
cin>>a>>b>>c;
cout< <"请输入一个大于0的整数,系统将给出0~num(输入的数)之间的不能被"
<<a<<","
<<b<<","
<<c<<","
<<"整除的数!\n";
cin>>nummax;
for (num=0;num< =nummax;num++)
{
if (num%a==0||num%b==0||num%c==0)
continue;
else
cout<<num<<‘\t';
}
cout<<endl;
system("pause");
}