Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created September 18, 2012 21:11
Show Gist options
  • Select an option

  • Save coderberry/3745922 to your computer and use it in GitHub Desktop.

Select an option

Save coderberry/3745922 to your computer and use it in GitHub Desktop.
arithmetic operators
>> 1 + 2 # => 3
>> 2 - 1 # => 1
>> 2 * 5 # => 10
>> 10 % 3 # => 1
>> 10 ** 3 # => 1000
>> 10 / 3 # => 3
>> ((5 * 2) - 2) # => 8
>> (5 * (2 - 2)) # => 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment