Код: Выделить всё
#include
#include
using namespace std;
bool prime(int);
/*
function to evaluate whether a positive integer is prime (true)
or not prime (false)
*/
int main()
{
for(int x=1; x
Подробнее здесь: [url]https://stackoverflow.com/questions/13512638/bool-function-for-prime-numbers[/url]
Мобильная версия