I was searching around about this topic but I still don\'t get it, if someone can elaborate I would be very thankful.
My task is to divide two variables as integer d
Yes, the %
operator will return the remainder of the Integer division.
To know more about the remainder of the Integer division check out Wikipedia:
If a and d are integers, with d non-zero, it can be proven that there exist unique integers q and r, such that a = qd + r and 0 ≤ r < |d|. The number q is called the quotient, while r is called the remainder.