eg0rmaffin

dived

Jul 5th, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void putint(int a)
  4. {
  5.     printf("%i", a);
  6. }
  7.  
  8.  
  9.  
  10. int main()
  11. {
  12.     int a = 50;
  13.     int b = 10;
  14.     int div = 0;
  15.     int mod = 0;
  16.     ft_div_mod(a, b, &div, &mod);
  17.     printf("%i, %i", div, mod);
  18. }
  19.  
  20. void ft_div_mod(int a, int b, int *div, int *mod) {
  21.  
  22.    
  23.     *div = a / b;
  24.     *mod = a % b;
  25.    
  26.     //printf(div);
  27.     //printf(resdiv);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment