* Optimized algorithm to check if number is prime or not.
* logic to check if given number is prime or not.
* logic to check if given number is prime or not.
* logic to check if given number is prime or not.
* logic to check if given number is prime or not.
* Included appropriate comments as per standards.
* variable name renamed to num
* added @file and @brief in comment. Also added template and variable name changed from is_prime to result
* added @file and @brief in comment. Also added template and variable name changed from is_prime to result
* added template parameter T type in loop