zaagan
12/11/2019 - 8:40 PM

Ruby Basics - Arithmetic Operators

Ruby Basics - Arithmetic Operators

=begin

Arithmetic Operators

Here, y = 5;
+    Addition              (x = y + 2 => 7)
-    Subtraction           (x = y - 2 => 3)
*    Multiplication        (x = y * 2 => 10)
/    Division              (x = y / 2 => 2.5)
%    Modulus (remainder)   (x = y % 2 => 1)

**   Exponent       (x = y**2 => 5 to the power 2)
                    
=end