PDA

View Full Version : Factorial Operator/Function


aspie
5th Nov 2001, 01:15 AM
Does one exist?

usaar33
5th Nov 2001, 11:45 PM
no but here is one:


static final postoperator int ! ( out int A )
{
local int b;
b=A-1;
While (b>1){
A*=b;
b--;
}
A=b;
}


Now just do intvar!;
:)