Karl Gauss had an algorithm that was more efficient than a for loop for summing the numbers 1 through N. To sum the numbers he used N ( N + 1 ) / 2
Write a program with two java Methods: one to calculate the sum with a for loop and the other using Gauss’s formula. Make calls to the two methods from the main Method.