1

Optimized Approach (Checking Up to √N)

News Discuss 
Optimized Approach (Checking Up to √N) Instead of checking up to num/2, we can optimize by checking up to √num: c Copy Edit #include #include int main() { int num, i, isPrime = 1; https://docs.vultr.com/clang/examples/check-whether-a-number-is-prime-or-not

Comments

    No HTML

    HTML is disabled


Who Upvoted this Story