Flaab Mrlinux wrote: > Hi there > > I have to do a program for the first time that needs some math...and > which is my surprise that num mod num to get the modulus of a division > does not work! neither num div num to the the integer result of it. > > All the rest of math operands work fine xDDD But how do i do: > > a) A float division ( 5 / 2 = 2.5) 5.0 / 2.0 = 2.5 > b) A mod division ( 5 mod 2 = 1) 5 % 2 = 1 > c) An integer division =S (5 div 2 = 2) 5 / 2 = 2 The point is, you tell the language what you want by specifying the numeric type. Floats have a decimal point and one or more digits to the right, even if only a zero. Integers don't. -- Paul Lutus http://www.arachnoid.com