What is test case 4

if k>n
k=k-n;

is there any other specification to complete it?

just replace k with k%n.