Module:Sandbox/Fulla07

Revision as of 20:22, 5 February 2022 by imported>Izno (rm)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Sandbox/Fulla07/doc

local p = {} --p stands for package

function p.isHappy( n )
       	--get single digits
   	local lastDigit
   	local tmp = 0
   	lastDigit = n % 10
   	tmp = tmp + lastDigit^2
   	return tmp
    --sum up the squares
    	

end

return p