Consider the following C program main () { int..

0

Consider the following C program
main ()
{
int x, y, m, n ;
scanf (“%d %d”, &x, &y); / * Assume x > 0 and y > 0 * /
m = x;
n = y ;
while ( m ! = n)
{
if (m > n)
m = m — n;
else n = n – m ;
}
printf(“%d”,n);
}
The program computes
A) x + y, using repeated subtraction
B) x mod y using repeated subtraction
C) the greatest common divisor of x and y
D) the least common multiple of x and y

Ravi Garg edited question
    Add image to editor add image from link

    Question stats

    • Active
    • Views58 times
    • Answers0 answers
    • Followers1 follower
    Question and answer is powered by AnsPress