clc //Initialization of variables Ha=0 Hb=0 //calculations H=Ha+Hb q=H U=0 w=q-H //results printf("Work done = %d",w)