From: Sebastian Hungerecker Date: 2007-02-18T23:10:10+09:00 Subject: Re: modulus/division.. Derek Teixeira wrote: > and for everyline i got "4" as the remainder.. but when i tried these > with a calulator .. i only got 4 as a remainder for the 1000. when i did > the 4/500 i got a .008 .. so shouldn't the % be an 8? The remainder of divison has nothing to do with what would come after the decimal point. You can calculate x%y as follows: First you calculate x/y (cutting off everything after the decimal point). Then you take this number and substract it from x. For example: 421/100==4 4*100==400 421%100==421-400==21 If y>x then x/y==0, so x%y==x. HTH, Sebastian Hungerecker -- NP: Nocte Obducta - Eins mit der Essenz der Nacht Ist so, weil ist so Bleibt so, weil war so