Ruby | Integer % method Last Updated : 18 Dec, 2019 Comments Improve Suggest changes Like Article Like Report The % is an inbuilt method in Ruby returns the remainder after the integer division of two numbers. It returns num1 % num2. Syntax: num1 % num2 Parameters: The function accepts no parameter. Return Value: It returns the remainder after the integer division of two numbers. Example 1: Ruby # Ruby program for % method in Integer # Initialize numbers num1 = 15 num2 = 4 # Prints remainder print num1 % num2 Output: 3 Example 2: Ruby # Ruby program for % method in Integer # Initialize numbers num1 = 21 num2 = 3 # Prints remainder print num1 % num2 Output: 0 Comment More infoAdvertise with us Next Article Ruby | Integer % method G gopaldave Follow Improve Article Tags : Ruby Ruby-Methods Ruby Integer-class Similar Reads Ruby | Integer / method The / is an inbuilt method in Ruby returns the division of two numbers. It returns num1 / num2. Syntax: num1 / num2 Parameters: The function accepts no parameter. Return Value: It returns the division of two numbers. Example 1: Ruby # Ruby program for / method in Integer # Initialize numbers num1 = 1 min read Ruby | Integer * method The * is an inbuilt method in Ruby returns the multiplication of two numbers. It returns num1 * num2. Syntax: num1 * num2 Parameters: The function accepts no parameter. Return Value: It returns the multiplication of two numbers. Example 1: Ruby # Ruby program for * method in Integer # Initialize num 1 min read Ruby | Integer + method The + is an inbuilt method in Ruby returns the addition of two numbers. It returns num1 + num2. Syntax: num1 + num2 Parameters: The function accepts no parameter. Return Value: It returns the addition of two numbers. Example 1: Ruby # Ruby program for + method in Integer # Initialize numbers num1 = 1 min read Ruby | Integer == method The == is an inbuilt method in Ruby returns true if both numbers are equal, else it returns false Syntax: num1 == num2 Parameters: The function accepts no parameter. Return Value: It returns true if both numbers are equal, else it returns false Example 1: Ruby # Ruby program for == method in Integer 1 min read Ruby | Integer ** method The ** is an inbuilt method in Ruby returns the a number raised to the power of other number. It returns num1 ^ num2.  Syntax: num1 ** num2Parameters: The function accepts no parameter.Return Value: It returns num1 ^ num2  Example 1:  Ruby # Ruby program for ** method in Integer # Initialize numb 1 min read Like