Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. numeros = [[
  2. 0,10
  3. 20,30
  4. 40,50
  5. 60,70
  6. 80,90
  7. ]]
  8.  
  9. local p = {}
  10. for v in numeros:gmatch('%d+') do
  11. table.insert(p,v)
  12. end
  13.  
  14. for i,v in next,p do
  15. if i%2~=0 then
  16. p[i] = {v}
  17. else
  18. table.insert(p[i-1],v)
  19. end
  20. end
  21.  
  22. for i = 1,#p do
  23. if i%2~=0 then
  24. print('<J>'..table.concat(p[i],'<VP>+</VP><J>') .. '</J><VP> = <J>' .. p[i][1]/300 .. '</J>+<J>' .. p[1][2]/300 .. ' </J>=<R> ' .. (p[i][1]/300)+(p[1][2]/300))
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement