Life is a Short Span, try to earn knowledge in every Field.
int GCD(int a, int b) { while (a != 0 && b != 0) { if (a > b) a %= b; else b %= a; } if (a == 0) return b; else return a; }
No comments:
Post a Comment