modular multiplication

a simple modular multiplication function in C++