Introduction
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
<?php
function armstrong_number($num) {
$sl = strlen($num);
$sum = 0;
$num = (string)$num;
for ($i = 0; $i < $sl; $i++) {
$sum = $sum + pow((string)$num{$i},$sl);
}
if ((string)$sum == (string)$num) {
return "True";
} else {
return "False";
}
}
echo "Is 371 Armstrong number? ".armstrong_number(371);
echo "<br>Is 21 Armstrong number? ".armstrong_number(8208);
echo "<br>Is 4587 Armstrong number? ".armstrong_number(10);"\n";
Introduction : java final keyword The final keyword present in Java programming language is generally used for restricting the user. …
C++ Memory Management We know that arrays store contiguous and the same type of memory blocks, so memory is allocated …