BasicSamples/TypeANumber/src/main/java/com/google/example/games/tanc/MainActivity.java
// This is not an implementation we are mathematically proud of, but it gets the job done.
This is not an implementation we are mathematically proud of, but it gets the job done.
This is not an implementation we are mathematically proud of but it gets the job done .
boolean isPrime(int n) {
        int i;
        if (n == 0 || n == 1) return false;
        for (i = 2; i <= n / 2; i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
boolean isPrime ( int n ) { int i ; if ( n == 0 || n == 1 ) return false ; for ( i = 2 ; i <= n / 2 ; i ++ ) { if ( n % i == 0 ) { return false ; } } return true ; }
This is not an implementation we are mathematically proud of, but it gets the job done.
This is not an implementation we are mathematically proud of but it gets the job done .