Problem in the coding given for calculation of dz2 and dz1

This is a duplicate thread: I already answered on the other copy.