C++ Program To Check Whether A Number Is The Sum Of 2 Prime Numbers #include <iostream> using namespace std; int check_prime(int n); int main() { int n, i, flag=0; cout << "Enter A Positive Integer: "; cin >> n; for(i=2; i<=n/2; ++i) { if (check_prime(i)==0){ if ( check_prime(n-i)==0) { cout << endl<< n << " = " << i << " + " << n-i << endl; flag=1; }}} if (flag==0) cout << endl << n << " Can't Be Expressed As Sum Of Two Prime Numbers." << endl; return 0; } int check_prime(int n) /*check prime number*/ { int i, flag=0; for(i=2;i<=n/2;++i) { if(n%i==0) { flag=1; break; }} return flag; }