我有這樣的代碼:分割數遞歸
public function divideNbPlay($nb_play){
if($nb_play % 400 !== 0){
$nb_play = divideNbPlay($nb_play % 400);
}
return $nb_play;
}
我想分裂的其餘,例如,如果我有
nb_play = 590, I want to return 190
nb_play = 806, I want to return 6
....
這正是你的代碼已經在做? – PeeHaa
爲什麼你需要爲此遞歸? – iainn
@PeeHaa,我不明白 –