Guest User

Untitled

a guest
Jun 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function KtoLbs(pK) {
  2. var nearExact = pK/0.45359237;
  3. var lbs = Math.floor(nearExact);
  4. var oz = (nearExact - lbs) * 16;
  5. return {
  6. pounds: lbs,
  7. ounces: oz
  8. };
  9. }
  10.  
  11. var imperial = KtoLbs(10);
  12. alert("10 kg = " + imperial.pounds + " lbs and " + imperial.ounces + " oz.");
  13.  
  14. function kgToPounds(value) {
  15. return value * ?conversionValue?;
  16. }
  17.  
  18. function poundsToOunces(value) {
  19. return value * 16;
  20. }
  21.  
  22. function KtoLbs(pK) {
  23. nearExact = pK/0.45359237;
  24. lbs = Math.floor(nearExact);
  25. oz = (nearExact - lbs) * 16;
  26. }
  27. /* sigh */
Add Comment
Please, Sign In to add comment