WRONG ANSWER ! in find the remainder of two numbers in beginners difficulty

I guess there is a wrong test case in that code , where a testcase when 4 divides 335 the remainder is 3 but the expected output is 4.