So I am new to Ruby and also programming. This is my second script,
making an if else elsif script.
So, I have 9.99 + 17.6. It should come out to 27.59, which is my elsif
part. It should trigger that argument thing.
But, it doesn’t. So I forced Ruby to show me it’s math. And, apparently,
9.99 + 17.6 = 27.5900000000003? That’s not right. And because of that
wrong addition done by Ruby, my elsif isn’t triggering.
I suspect some sort of rounding thing with Ruby. But, how do I get
around this? Thanks – I tried looking it up but I couldn’t understand.