C
Chad Perrin
I'm a little confused by these results. Perhaps someone can tell me
what I'm assuming incorrectly:
$ irb
irb(main):001:0> 5 / 9 * ( 100 - 32 )
=> 0
irb(main):002:0> ( 5 / 9 ) * ( 100 - 32 )
=> 0
irb(main):004:0> ( 100 - 32 ) * ( 5 / 9 )
=> 0
irb(main):003:0> ( 100 - 32 ) * 5 / 9
=> 37
The last result is the only one that gives me what I actually wanted.
In case you're wondering, yes, that *is* an F-to-C temperature
conversion.
what I'm assuming incorrectly:
$ irb
irb(main):001:0> 5 / 9 * ( 100 - 32 )
=> 0
irb(main):002:0> ( 5 / 9 ) * ( 100 - 32 )
=> 0
irb(main):004:0> ( 100 - 32 ) * ( 5 / 9 )
=> 0
irb(main):003:0> ( 100 - 32 ) * 5 / 9
=> 37
The last result is the only one that gives me what I actually wanted.
In case you're wondering, yes, that *is* an F-to-C temperature
conversion.