pejuge2 1 #1 Posted June 7, 2010 Esse sistema identifica as posições dos números: local tabela = { {1, 3, 5}, {1, 5, 2}, {4, 9, 7} } function consecutive(matrix, min, max) local txt for all = min, max do txt = 'Número ' .. all .. ': ' for all2 = 1, #matrix do for all3 = 1, #matrix[all2] do if matrix[all2][all3] == all then txt = txt .. all2 .. '/' .. all3 .. '; ' end end end print(txt) end end consecutive(tabela, 0, 9) Share this post Link to post Share on other sites
pejuge2 1 #2 Posted June 9, 2010 Quero agradecer a todos os comentários aqui postados (nenhum). Share this post Link to post Share on other sites
Socket 0 #3 Posted June 9, 2010 Muitíssimo complexo ' Tinha feito essa função uns tempos atrás Publica seu sistema inteiro de matrizes. kkk Muito tenso. Share this post Link to post Share on other sites