This:
num / 50 = i;
num % 50 = m;
Is seriously illegal in C. You have to do this:
i = num / 50;
m = num % 50;
Why? Because the equals sign in C doesn't work the way it does in math. In math, an equals sign establishes that two expressions are already equal. It tells you something new about them, but doesn't change them.
In C, it's expressly used to change a variable, something you can't really do in traditional math notation. It copies the value on the right into the variable address on the left. That's why some people call it "gets" instead of "equals," as in "i gets num / 50." It makes sense when you read it that way.