#531. Remainder (mod)
When the green flag is clicked, this script runs. What number will the cat say?
when green flag clicked say ((17) mod (11))
# When the green flag is clicked print(17 % 11)
// Scratch's mod gives a positive remainder even for negative numbers
function mod(a, b) {
return ((a % b) + b) % b;
}
// When the green flag is clicked
console.log(mod(17, 11));
💡 Not sure? Build it in Scratch and try it out.