kd2bwzgen

testscorecalc

Jun 14th, 2017
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. local function round(num, numDecimalPlaces)
  2. return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num))
  3. end
  4. local c,ic = ...
  5. c = tonumber(c)
  6. ic = tonumber(ic)
  7. print(tostring(round((c/(c+ic))*100)).."%")
Advertisement
Add Comment
Please, Sign In to add comment