Modulo (%) gives the remainder after division: a mod b = remainder of a ÷ b. It is fundamental to clock arithmetic, cryptography, hashing, cyclic patterns, and determining even/odd numbers. In programming, % is the modulo operator.
💡
Pro Tip
In Python, -7 % 3 = 2 (not -1). Python always returns a non-negative result for positive modulus. In C/Java, -7 % 3 = -1. This difference causes bugs — always test with negative numbers.
⭐
Did You Know?
The ISBN-13 barcode uses modulo 10 for its check digit: multiply alternate digits by 1 and 3, sum them, and the check digit makes the total divisible by 10. This detects single-digit errors with 100% accuracy.
References
🔒
100% Miễn phí
Không cần đăng ký
✓
Chính xác
Công thức đã xác minh
⚡
Tức thì
Kết quả khi nhập
📱
Sẵn sàng di động
Mọi thiết bị