Updated console.log and duplicate alert to display results of calculation