int func5(int n, int d) { // input condition: You really need one ... what is it? // output condition: returns the integer part of n/d int m = n; int q = 0; while (m >= d) { m -= d; q++; } return q; }