Can you make a calculator in any language which DOES NOT use the +
, -
, *
, /
operators.
Anyone who does will get a shoutout on my next Can you post.
We're a place where coders share, stay up-to-date and grow their careers.
Can you make a calculator in any language which DOES NOT use the +
, -
, *
, /
operators.
Anyone who does will get a shoutout on my next Can you post.
For further actions, you may consider blocking this person and/or reporting abuse
Ben Halpern -
SUCHINTAN DAS -
Janice Alecha -
Ben Halpern -
Once suspended, vulcanwm will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, vulcanwm will be able to comment and publish posts again.
Once unpublished, all posts by vulcanwm will become hidden and only accessible to themselves.
If vulcanwm is not suspended, they can still re-publish their posts from their dashboard.
Discussion (13)
Too lazy to figure out how to deal with the remainder in division, but here is a cut at a calculator in Ruby that doesn't use math operators.
Wow .sum is a function in Ruby? That made it so easy.
Yeah, that's sort of a cheat — but Ruby's like that 🤣
eval("10 + 10")
also would have been a quick answer here, but that seemed just a bit too easy.Oh- wow
Okay, let's do this without using
sum
oreval
then 🙃I'm kind of not happy with
div
, but hard to do it nicely without introducing fractions.cc @ben
Nice stuff!
Woah this is really nice!
Ben's technique but in python lol
Is that a cheat lmao?
Ofc lol
Great!!!