in reply to quick question,why int turns to float

is that mean i should migrate all my codes from "print" to "printf"...? it's tough:(
  • Comment on Re: quick question,why int turns to float

Replies are listed 'Best First'.
Re^2: quick question,why int turns to float
by graff (Chancellor) on Jun 23, 2009 at 03:10 UTC
    i should migrate all my codes from "print" to "printf"...?

    Only those print statements that involve floating-point values, and only when you really care about how the output looks (which probably should be most of the time, when it involves floats).

    As for how tough it is, you only need to fix existing code once, and you'll be better off than you would be if you didn't fix it, don't you think? Also, now you know how to do it right the first time whenever you write new code.