Runtimeanalysis30

0. Assume that X and Y are non zero positive integers. What does the following Pascal program segment do?
while X Y do
if X > Y then
X : = X - Y
else
Y : = Y - X ;
write (X);

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *