ft_div_mod.c 262 B

123456789
  1. /* This function divides parameters a by b and stores the result in the int pointed by
  2. div. It also stores the remainder of the division of a by b in the int pointed by mod. */
  3. void ft_div_mod(int a, int b, int *div, int *mod)
  4. {
  5. *div = a / b;
  6. *mod = a % b;
  7. }