daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bool isPrime(int num) {
  2.     for (int i = 2; i < num; i++) {
  3.         for (int j = 0; j < num; j++) {
  4.             if (i*j == num) {
  5.                 return false;
  6.             }
  7.         }
  8.     }
  9.     if (num == 1) {
  10.         return false;
  11.     }
  12.     return true;
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top