Class: Mathematics::Arithmetic

Inherits:
Object
  • Object
show all
Defined in:
lib/veeru.rb

Class Method Summary collapse

Class Method Details

.add(a, b) ⇒ Object



3
4
5
# File 'lib/veeru.rb', line 3

def self.add(a,b)
	puts "The sum of two numbers are: #{a+b}"
end

.div(a, b) ⇒ Object



12
13
14
# File 'lib/veeru.rb', line 12

def self.div(a,b)
	puts "The Division of two numbers are: #{a/b}"
end

.mul(a, b) ⇒ Object



9
10
11
# File 'lib/veeru.rb', line 9

def self.mul(a,b)
	puts "The multiplication of two numbers are: #{a*b}"
end

.square(a, b) ⇒ Object



15
16
17
# File 'lib/veeru.rb', line 15

def self.square(a,b)
	puts "The #{a} power #{b} is : #{a**b}"
end

.sub(a, b) ⇒ Object



6
7
8
# File 'lib/veeru.rb', line 6

def self.sub(a,b)
	puts "The subtraction of two numbers are: #{a-b}"
end