Demo entry 6747499

c++

   

Submitted by anonymous on Jun 04, 2018 at 06:05
Language: C++. Code size: 178 Bytes.

bool prime(int x){//判断x是不是质数,是返回true,不是返回false 
    if(x <= 1) return false; 
    for(int i = 2; i < x; i ++){
        if(x % i == 0) return false;
    }
    return true;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).