code accepted....
Never use float unless you are ok with inaccuracy. Solve this problem without using floating point numbers at all. Use integers.
en.m.wikipedia.org/wiki/Floating_point
thanx a ton....