>>26
篩じゃない奴。
int IsPrime( unsigned int t ) {
    const unsigned int lim = (unsigned int)sqrt(i);
    unsigned int i = 2;
    while( i < lim && t % i != 0 )
        i++;
    return i == lim;
}