Ruby program to convert the string into an integer
str = "10.5";
result = str.to_i();
print "Result: ",result;
Output:
Result: 10
str = "10.5";
result = str.to_i();
print "Result: ",result;
Output:
Result: 10