#565. Remainder (mod)
When the green flag is clicked, this script runs. What number will the cat say?
when green flag clicked say ((112) mod (12))
# When the green flag is clicked print(112 % 12)
// 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(112, 12));
💡 Not sure? Build it in Scratch and try it out.