DEV Community

Discussion on: [Challenge] Add numbers without (+-*/)

Collapse
 
pyrsmk profile image
Aurélien Delogu • Edited

This is clearly cheating, but here we go with a Ruby solution :D

def add(a, b)
  [a, b].sum
end
Enter fullscreen mode Exit fullscreen mode
Collapse
 
nombrekeff profile image
Keff

Hahahah true xD if we stick to the rules yup... but I think I'll pass this one. I guessed there would be some languages that had built-in methods like this! What's the language BTW?

Collapse
 
pyrsmk profile image
Aurélien Delogu

Ruby and, by extension, Crystal.