Re: A89: Divide by Zero problem
[Prev][Next][Index][Thread]
Re: A89: Divide by Zero problem
In a message dated 00-06-29 21:19:25 EDT, you write:
> (random(99) + 1) / (14 / 100)
>
> I get an error message (from TEOS) saying Divide by zero. What's up with
> this?
>
It is just a truncation error...14/100 is 0 since they are integers...I'm not
familiar w/ C yet but I just started "The C Programming Language" since
everyone seemed to recommned it...I suppose you can force? them to be floats
by doing (14.00/100)? Is this right people???