![]() |
The succ function in Ruby returns the immediate successor of the number, i.e., it returns number + 1. If a float value is used, it throws an error message.
Example 1: Ruby
Output: 101 18 -89 -28 Example 2: Ruby
Output: 20 -16 -17 17
|
Reffered: https://www.geeksforgeeks.org
Ruby |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 11 |