remainder

Division, Remainders and only Real Numbers Allowed

Trying to figure out this pseudo code. The following is assumed.... I can only use unsigned and signed integers (or long). Division returns a real number with no remainder. MOD returns a real number. Fractions and decimals are not handled. INT I = 41828; INT C = 15; INT D = 0; D = (I / 65535) * C; How would you handle a fraction (or...

remove remainder from string in php

Hi. Simple question. I have this code: total = 41 win = 48 echo ($total/$win) * 100 ; printing out 85.416666666667 I need to remove the remainder so it prints out: 85 %. ...

Output is off in for loop

Okay, so I'm trying to learn how to use the % operator, and I made a simple program that prints out [0] in a loop, and every ten times it goes to the next line, but the first time it doesn't. this is the output: [0][0][0][0][0][0][0][0][0][0][0] [0][0][0][0][0][0][0][0][0][0] [0][0][0][0][0][0][0][0][0][0] [0][0][0][0][0][0][0][0][0][0...