What's meaning of this symbol?
#1

what is this symbol mean in pawno:
pawn Код:
%
some scripters use it in math just like * / + -
Reply
#2

Isnt it "Modulo" ?
To give the rest of a division "/" ?
Reply
#3

its procent lol just a different model
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)