Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * UCLN.cpp
- *
- * Copyright 2014 by nguyenvanquan7826
- *
- * Email : [email protected]
- * Blog : nguyenvanquan7826.wordpress.com
- *
- */
- #include <iostream>
- using namespace std;
- int UCLN(int a, int b){
- if (a%b == 0) return b;
- return (UCLN(b, a%b));
- }
- int main (int argc, char **argv)
- {
- int a, b;
- cin >> a >> b;
- cout << UCLN(a, b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement