Code:#include <iostream> using namespace std; int main () { int j; int t; int p; int num; cout << " Please enter an even integer greater than 2: "; cin >> num; for ( int i = 2 ; i < num; i++ ) if ( ( i == 2 ) or ( i % 2 != 0 ) ) { p = i; } { for ( int j = 2; j > p; j++ ) if ( p % j != 0 ) t = p; cout << t << endl; } return 0; }
I'm using this program to give me the prime numbers that are less than the number entered, but it's not working?