Simple modulo in c++