var total has been added to calculate the formula of the users input answers.