Assume that x and y are non-zero positive integers. What does the following program segment perform?

while (x! = 0)

{

if (x>y)

x = x-y

else

y=y-x;

printf("%d", x);

1
Computes LCM of two numbers
2
Computes GCD of two numbers
3
Divides large number with small number
4
Subtracts smaller number from large number

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation