Witam wszystkich, to mój pierwszy post na forum. Mógłby mi ktoś wskazać błędy w tym programie? 
#include <iostream>
#include <math.h>
double czy_pierwsza(int x){
double a = sqrt(x);
int b = 2;
while (b <= a){
if ((x%b) == 0){
return 0;
}
b++;
}
};
using namespace std;
int main()
{
int n = 1;
while (n < 100000){
cin >> n;
if (czy_pierwsza(n)){
cout << n << "TAK" << endl;
}
else
cout << "NIE" << endl;
n++;
}
return 0;
}
Na moim komputerze (wydaje się), że elegancko działa, podczas wszystkich testów, a na stronie wyskakuje, że jest jakiś błąd.