DO
=
to 1
DO
=
to
END
END
DO
= 2 to
END
Grad = 0
DO
= 1 to
Grad = Grad +
END
Algorithm 1: