Page 1 of 1

Average ping using array .

Posted: Fri Apr 17, 2015 4:40 pm
by suporteitanet
Greetings ,


I need translate this algorithm to Routeros scripting language. If someone can help me i will apreciate .

int ping [10] , i , sum, avgping, actping ;
sum=0;

for (i=1;i<=10;i++)
{
actping = ping
sum=sum+actping
}
avgping=sum / i

Thanks in advance.