Ruby program to demonstrate the floor() function

bookmark

num1 =  10.23;
num2 = -20.53;

print "Num1: "  ,num1.floor();
print "\nNum2: ",num2.floor();

 


Output:

Num1: 10
Num2: -21