• Sign in
  • Sign up 
  • Welcome
  • FAQ
  • Switch to Night Mode
  • Stolen Accounts Recovery 
  • Change Account Password 
  • Vote for Witnesses 
  • Steem Proposals 
  • Developer Portal 
  • Steem Bluepaper 
  • SMT Whitepaper 
  • Steem Whitepaper 
  • Privacy Policy
  • Terms of Service
Homeby Witness Moecki
LoginSign up

Armstrong

drago18121996 (68)in #ita • last month

declare(strict_types=1);

function isArmstrongNumber(int $number): bool
{
$res = 0;
$str_cr = (string)$number;
$len = strlen((string)$number);
for($i=0; $i<$len; $i++)
{
$res += ((int)$str_cr[$i]) ** $len;
var_dump($res);
}
return $number == $res;

}

#live #life #information #society
last month in #ita by drago18121996 (68)
$0.02
  • Past Payouts $0.02
  • - Author $0.01
  • - Curators $0.01
3 votes
  • + sbi6
  • + boylikegirl.wit
  • + drago18121996
Reply 0