I\'m having trouble with this C++ code. The integer num is a number that I want to check if it is prime. However this program is always returning false. It\'s proba
num
bool isprime(int n) { if(n<2) return false; if(n==2)return true; for(int i=2;i<=sqrt(n);i++) if(n%i==0) return false; return true; }