Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n;
- int cmmdc(int a, int b)
- {
- int r;
- while(b != 0)
- {
- r = a % b;
- a = b;
- b = r;
- }
- return a;
- }
- int main()
- {
- cout << cmmdc(12, 20);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment