Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. int DivImpar(int a, int b){
  2. while (a % 2 == 0)
  3. a = a / 2;
  4.  
  5. while (b % 2 == 0)
  6. b = b / 2;
  7.  
  8. while (a != b) {
  9. if (a > b)
  10. a = a - b;
  11. else
  12. b = b - a;}
  13. return a;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement