Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <string>
- #include <algorithm>
- using namespace std;
- void evklid ( int a, int b)
- {
- int l=0;
- while (a!=0 && b!=0)
- {
- if (a>b)
- a%=b;
- else b%=a;
- }
- l=a+b;
- cout << l;
- }
- int main ()
- {
- int a=0, b=0;
- cin >> a >> b;
- evklid (a, b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement