1 votes 1 votes 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) } Computes LCM of two numbers Computes GCD of two numbers Divides large number with small number Subtracts smaller number from larger number Programming in C ugcnetsep2013ii programming-in-c + – go_editor asked Jul 21, 2016 • recategorized May 24, 2020 go_editor 845 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes The code has many syntax errors. eg: int is written in place of if By analysing logic it seems like it computes GCD of two numbers! sh!va answered Jul 21, 2016 sh!va comment Share Follow See all 0 reply Please log in or register to add a comment.