fork download
  1. x = io.read()
  2. if x ~= 0 then
  3. print(x .. " diferente de 0")
  4. end
  5. if x == "1" then
  6. print(x .. " igual 1")
  7. end
  8. if tonumber(x) == 1 then
  9. print(x .. " igual 1")
  10. end
  11.  
  12. --https://pt.stackoverflow.com/q/475123/101
Success #stdin #stdout 0s 4436KB
stdin
1
stdout
1 diferente de 0
1 igual 1
1 igual 1