Answers for "absolute function ruby"

0

ruby absolute value

# Ruby program Integer abs() function
  
# Initializing the numbers 
num1 = -21
num2 = 21 
num3 = 0 
num4 = -100 
   
# Printing the absolute value of integers 
puts (num1).abs
puts (num2).abs
puts (num3).abs
puts (num4).abs
Posted by: Guest on July-29-2021

Browse Popular Code Answers by Language