Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Done #19

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions lib/math.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
def addition(num1, num2)

sum = num1 + num2
return sum
end

def subtraction(num1, num2)

difference = num1 - num2
return difference
end

def division(num1, num2)

quotient = num1 / num2
return quotient
end

def multiplication(num1, num2)

product = num1 * num2
return product
end

def modulo(num1, num2)

divide = num1 / num2
round = num2 * divide
remainder = num1 - round
return remainder
end

def square_root(num)

root = Math.sqrt(num)
return root
end