![]() |
Float divmod() is a float class method that returns an array having the quotient and remainder on dividing two numbers.
Example #1: Ruby
Output : Division a/b : [2, 0.0] Division b/a : [0, 2.0] Example #2: Ruby
Output : source_file.rb:8:in `divmod': divided by 0 (ZeroDivisionError) from source_file.rb:8:in `' Division a/b : [0, 0.0]
|
Reffered: https://www.geeksforgeeks.org
Ruby |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 9 |