Methods of Int32
-
abs
-
round
-
even
-
gcd
answer = -42
p! answer.abs # 42
p! answer.even? # true
p! answer.round # -42
puts 42.gcd(35) # 7 ( Greatest common divisor )
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
abs
round
even
gcd
answer = -42
p! answer.abs # 42
p! answer.even? # true
p! answer.round # -42
puts 42.gcd(35) # 7 ( Greatest common divisor )