//Function to check if a number is prime bool isPrime(int num) { if(num < 2) //condition to check if the number is not prime number return false; for(int i=2; i*i ...