0) { $rem = $num % 10; $sum = $sum + pow($rem , $nod); $num = (int)($num / 10); } //checking if($sum == $temp) { return true; } else { return false; } } //Execution echo"Armsrtrong numbers between 1-500 are:\n"; for($num=1 ; $num <= 500; $num++) { if(chkarm($num)) { echo"$num\n"; } } ?>
0 Comments