Stock Warning
#7

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
... just use a do while loop, also use constants and remove useless variables
PHP код:
stock stockname(param) {
    const
        
mp 4,
        
pp 2
    
;
    new
        
i
    
;
    do {
        
param -= (++mp) + pp;
    } while(
param);
    return 
i;

Changed mine with yours. Thanks.
Reply


Messages In This Thread
Stock Warning - by Ilhan - 18.02.2016, 14:17
Re: Stock Warning - by zPain - 18.02.2016, 14:28
Re: Stock Warning - by Ilhan - 18.02.2016, 14:39
Re: Stock Warning - by Gammix - 18.02.2016, 14:43
Re: Stock Warning - by Ilhan - 18.02.2016, 14:51
Re: Stock Warning - by Nero_3D - 18.02.2016, 16:32
Re: Stock Warning - by Ilhan - 18.02.2016, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)