```
bool is_prime(int a)
{
if(a==1){return false;}
if(a<4){return true;}
if(a%2==0){return false;}
if(a<9){return true;}
if(a%3==0){return false;}
int i;
for(i=5;(i*i)<=a;i+=6)
{
if(a%i==0){return false;}
if(a%(i+2)==0){return false;}
}
return true;
}
```

critique welcome.