class Algebra { static boolean isPrime(int c) // Returns true if c is prime. { if (c % 2 == 0) return false; int d; d = 3; while (d != c) // If c < 0 we're in trouble! { if (c % d == 0) return false; d = d + 2; } return true; } static int gcd(int a, int b) /* Find greatest common divisor. */ { int m; m = b % a; if (m == 0) return a; else return gcd(m, a); } static int fibonacci(int n) // Find n-th Fibonacci number. { if ((n == 1) || (n == 2)) return 1; else return fibonacci(n-1) + fibonacci(n-2); } }