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 CheckPrime(int num) { bool yayornay = true; for(int i = 2; i < num; i++) { if(num % i == 0) { yayornay = false; break; } } return yayornay; }