以下代码使用了辗转相除法求解最大公因数,请在横线处填入( ),使其能正确实现相应功能。
1 int gcd(int a, int b) { 2 while (b != 0) { 3 ______________________ 4 } 5 return a; 6 }
int temp = b; b = a / b; a = temp;
int temp = a; a = b / a; b = temp;
int temp = b; b = a % b; a = temp;
b = a % b; a = b;