On 22-Feb-02 Rich Mcelroy wrote: > I'm using Bytecraft's compiler for MPLAB. it does basic math, but the > results I'm getting indicate that it is droping anything after the integer > on my calculations. I'm trying to calculate a percentage: > > Percent = A/B * 100; something like that. I have been getting a zero for > percent everytime. What are the types of A & B please ? If they are integers, then the result of the division will be an integer. I would try (100.0 * A) / B That should "promote" the result to be a floating point type. See Page 44 of the Second edition of K&R. Peter. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics