text: If n is divisible by any number between 2 and Math . Sqrt ( n ) , it is not prime
code: for ( int i = 2 ; i * i <= n ; i ++ ) { if ( n % i == 0 ) { flag = 0 ; break ; } } return ( flag == 1 ? true : false ) ; }