%Brandon Smith %Homework due: 2-7-07 %Program will determine amount of heat needed to convert different stages %of water as temp. rises g=input('enter the number of grams ') t1=input('enter the initial temperature ') t2=input('enter the final temperature ') if (t1<0) if (t2<0) heat = g*(t2-t1)*.48 elseif (t2<100) heat = g*(0-t1)*.48 + g*79.8 + g*(t2) else heat = g*(0-t1)*.48 + g*79.8 + g*(100)+ g*540 + g*.475*(t2-100) end end