Java experiment 3.1 (calculate the average of 1 to 50)