QP School
QP School
>
Tutorials
>
Ruby 3 Tutorials, exercises and examples
> Successor in Ruby
Full Version:
Successor in Ruby
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
Qomplainerz
02-28-2021, 10:29 AM
If you want to get the successor of a number in Ruby you can do it as follows:
Quote:
puts 1.succ
This will print 2 on the screen
QP School
>
Tutorials
>
Ruby 3 Tutorials, exercises and examples
> Successor in Ruby