Tabela

Programa que gera um vetor de pares ordenados (x,p(x)) e imprime os elementos desse vetor.

function Point(x)

        return { x = x, y = x*x}

end

vetor = { }

i = 1

while i < 10 do

vetor[i] = Point(i)

print(vetor[i].x.." "..vetor[i].y)

i = i + 1

--print(#vetor)

end

voltar

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.