diff options
Diffstat (limited to 'googletest/samples/sample1.cc')
-rw-r--r-- | googletest/samples/sample1.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/samples/sample1.cc b/googletest/samples/sample1.cc index 1d427597..80b69f41 100644 --- a/googletest/samples/sample1.cc +++ b/googletest/samples/sample1.cc @@ -52,9 +52,9 @@ bool IsPrime(int n) { // Now, we have that n is odd and n >= 3. // Try to divide n by every odd number i, starting from 3 - for (int i = 3; ; i += 2) { + for (int i = 3;; i += 2) { // We only have to try i up to the square root of n - if (i > n/i) break; + if (i > n / i) break; // Now, we have i <= n/i < n. // If n is divisible by i, n is not prime. |