What's meaning of this symbol?
#4

It gives the reminder.
pawn Код:
new
    a = 10,
    b = 2;
printf("The reminder while dividing 10/2 is %d", a%b);
//Outputs 0

a = 3, b = 2;
printf("The reminder while dividing 3/2 is %d", a%b);
//Outputs 1


//A function example, whether if a number is odd or even.

stock bool:IsNumberOdd(number) {
    if((number % 2) == 0) return false;
    else return true;
}

Returns true if the number is odd, false if it's even.
Reply


Messages In This Thread
What's meaning of this symbol? - by AnonScripter - 02.02.2014, 00:06
Re: What's meaning of this symbol? - by anou1 - 02.02.2014, 00:08
Re: What's meaning of this symbol? - by UnClear - 02.02.2014, 00:10
Re: What's meaning of this symbol? - by Lordzy - 02.02.2014, 00:12

Forum Jump:


Users browsing this thread: 2 Guest(s)