|
- #include<iostream>
- using namespace std;
- int i,x,y,z;
- bool b1,b2;
- int main()
- {
- cout<<"\n===========zhishu III============\n";
- x=100;
- for(y=1;y<=x/2;y++)
- {
- i=2;
- b1=true;
- while(i*i<=y && b1)
- {
- if(y%i==0) b1=false;
- else i++;
- }
- z=x-y;
- i=2;
- b2=true;
- while(i*i<=z && b2)
- {
- if(z%i==0) b2=false;
- else i++;
- }
- if(b1 && b2 && y+z==100) cout<<y<<' '<<z<<endl;
- }
- return 0;
- }
复制代码 |
|