Advertisement
BobMe

Decimal Remover 2

Dec 17th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. number = 9128317.11283718618
  2. h = tostring(number)
  3.  
  4. thenumber = 0
  5. for i=1,100 do
  6. if string.sub(h,i,i) == "." then
  7. thenumber = i
  8. break
  9. end
  10. end
  11.  
  12. number = string.sub(h,1,thenumber - 1)
  13. number = tonumber(number)
  14. print(number)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement