22.02.2016, 02:08
Код:
stock SubtractNumber(...) { new result = 0; for(new i = 0; i < numargs(); ++i) { result = result - getarg(i); printf("Arg %d = %d", i,getarg(i)); } return result; }
stock SubtractNumber(...) { new result = 0; for(new i = 0; i < numargs(); ++i) { result = result - getarg(i); printf("Arg %d = %d", i,getarg(i)); } return result; }
stock SubtractNumber(start, ...)
{
new result = start;
for(new i = 1, l = numargs(); i < l; ++i)
{
result = result - getarg(i);
printf("Arg %d = %d", i,getarg(i));
}
return result;
}
printf("%i", SubtractNumber(15, 5, 4));
6