Skip to content

Instantly share code, notes, and snippets.

@shirayuca
Created December 23, 2014 14:55
Show Gist options
  • Save shirayuca/bc48452d83c2c8e9ddcf to your computer and use it in GitHub Desktop.
Save shirayuca/bc48452d83c2c8e9ddcf to your computer and use it in GitHub Desktop.
### 関数の考え方
def kakezan(x, y)
puts x * y
end
a = 2
b = 3
kakezan(a, b)
array = [1,2,3,4,5,6,7,8,9]
array.each do |number|
kakezan(2, number)
end
### Googleスプレッドシートの例
# def KAKEZAN(x, y)
# return x * y
# end
# =KAKEZAN(A1,B1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment