能不能直接用%来算?如果能:int mymod(int a, int b){return a%b;}如果不能:int mymod(int a, int b){while(a > b){a -= b;}return a;}