Advertisement
eg0rmaffin

ultimate divided xd xd xd

Jul 5th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 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 = 11;
  14.     ft_div_mod(&a, &b);
  15.     printf("%i, %i", a, b);
  16. }
  17.  
  18. void ft_div_mod(int *a, int *b) {
  19.  int tmp1;
  20.  int *tmp;
  21.  tmp = &tmp1;
  22.  *tmp = *a / *b;
  23.  *b = *a % *b;
  24.  *a = *tmp;
  25.  
  26.    
  27.     //printf(div);
  28.     //printf(resdiv);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement