function linearSearch(table, element)
local position=0
while position<#table do
if table[position]==element then
return position
else
position=position+1
end
end
end
math.randomseed(is.time())
array={}
for i=1,10 do
array[i]=math.random(0,99)
end
print(table.concat(vetor,","))
io.write("Enter a number to search in array:\n")
num=io.read("*n")
buscaLinear(array,num)
Help me, guys!
Thanks a lot!
Jorge Eduardo