used if statement and used the fahrenheight formula