Declared variables and printed solution out to console for problem 2.