|
#include <iostream>
#include <cmath>
using namespace std;
int x,i,j,ii,b1,b2;
int main()
{
cin>>x;
for (i=2;i<=x/2;i++)
{
j=x-i;
b1=true;ii=2;
while ((ii<=sqrt(i))&& b1)
if (i%ii==0) b1=false;
else ii++;
b2=true;ii=2;
while ((ii<=sqrt(j))&& b2)
if (j%ii==0) b2=false;
else ii++;
if (b1&&b2) cout <<x<<'='<<i<<'+'<<j<<endl;
}
return 0;
}
|
|