早睡早起,方能养生!
Sleep early rise early, square can preserve one's health!

辗转相除法求最大公约数

super
2021-08-26 18:10
views 153
$a = 417;
$b = 396;

while ($b != 0) {
    $c = $a % $b;
    
    $a = $b;
    $b = $c;
}
print_r($a);

 

 

在线运行

 


分享
0 条讨论
top