/* ESC101 : Fundamental of Computing Lab 6 for 10th September 2008 Write a JAVA program to find the approximate value of Erdos Brownian Constant, by calculating the first 30 terms of the summation. Your program has to design and use the following methods: int noOfDivisors (int n): returns number of divisors of n. int power (int n, int k): returns nk. In the main method, declare a double variable sum and initialize it to 0. Call both of the above methods in a loop for each value of n to get each term of the sum. */ class Erdos { //Method to calculate n^k public static int power(int n, int k) { int power = 1; int i; for(i=0;i