Hi everybody,
How can i find out if a number is prime or not ?
For example :
#include <iostream>
using namespace std;
int main () {
int number;
bool isprime;
cin >> number;
/*algorithm
..............
..............
..............
*/
if (isprime == false) {
cout << "Not prime";
} else {
cout << "Prime";
}
}