a guest Jul 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- // n=5, k=3, i=1 // result 2
- function get_last_kid(n,k,i)
- return (k%n); //returns (toys/nunmber of kids)
- return (k%n)+i;
- alert( get_last_kid(3,7,3) )
RAW Paste Data