Successor in Ruby - Printable Version +- QP School (https://qomplainerzschool.lima-city.de) +-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3) +--- Forum: Ruby 3 Tutorials, exercises and examples (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=17) +--- Thread: Successor in Ruby (/showthread.php?tid=2507) |
Successor in Ruby - Qomplainerz - 02-28-2021 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 |