Solution for the excersise before calculator.