vendredi 28 août 2020

if statement and the maximal value in Pascal

Looking at this code:

enter image description here

I thought that the program won't give the right maximal value if z>x and y>x ,but, to my surprise, it did give the correct value. Why is that? Did the program compare Y and Z and gave the biggest value without me ordering it to do so?

Aucun commentaire:

Enregistrer un commentaire