Advertisement
BobMe

fatness calculator

Jun 25th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. local ageofdeath = 84
  2.  
  3.  
  4. local bagofchipsday = 2
  5.  
  6.  
  7. local averagehumanweight = 140
  8.  
  9.  
  10. local sum = ageofdeath*365
  11. local pounds = averagehumanweight
  12.  
  13. for i=1,sum do
  14. for i=1,bagofchipsday do
  15. pounds = pounds + .01
  16. end
  17. end
  18.  
  19. function round(number)
  20. kek = nil
  21. local strnum = tostring(number)
  22. for i=1,#strnum do
  23. if string.sub(strnum,i,i) == "." then
  24. kek = tonumber(string.sub(strnum,i+1,i+1))
  25. kek2 = tonumber(string.sub(strnum,1,i-1))
  26. end
  27. end
  28. if kek ~= nil then
  29. if kek >= 5 then
  30. kek2 = kek2 + 1
  31. else
  32. kek2 = kek2
  33. end
  34. end
  35. return kek2
  36. end
  37.  
  38. print("Client weight at death is : "..round(pounds).." pounds.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement