hey im trying to do a quick mod function, i know % exists but this will have other applications... Basically the main issues is when you return "num" it is a different value than if you look at num before it is returned...
Any ideas? thanks in advance
int mod(int num, int num2)
{
if (num < num2)
return num;
mod(num-num2,num2);
}