Here's my example code in C:
int x, y;
x = 7 % 10;
y = 10 % 7;
printf("%d, %d", x, y);
It prints: 7, 3
I understand 10 % 7 = 3
.
I don't understand 7 % 10 = 7
.
I've tried the same code using float variable and got the same answer. How does mod work when the divisor is larger than the dividend? I would really like to fundamentally understand how to use this operator.