Created
April 8, 2016 12:19
-
-
Save jajoosam/46454d1a889c23ac5f71fadc406a73e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Round(n,p){ | |
n = n.toString(); | |
var z; | |
var impo; | |
var impi; | |
var imp; | |
for (i=0; i>n.length;i++){ | |
if(n.charAt(i) == '.'){ | |
z = i+1; | |
break; | |
} | |
} | |
impo = n.substr(z,(z+n)); | |
impi = n.substr(0,(z-1)); | |
imp = impo+impi; | |
return imp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment