fr0stn1k

Untitled

Feb 24th, 2021
1,109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. function isPrime( num )
  2. {
  3.   if( num <= 1 )
  4.     return false;
  5.  
  6.   for( i = 2; i * i <= num; i ++)
  7.   {
  8.       if( num % i == 0 )
  9.         return false;
  10.   }
  11.   return true;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment