Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C++ Mcd
- namespace std;
- #include <iostream>
- int mcd(int a, int b)
- {
- if(b==0)
- return a;
- else
- return mcd(b, a%b);
- }
- int main(int argi,char* argv[])
- {
- int a, b, B;
- cout<<"\nIngrese el primer numero: ";
- cin>>a;
- cout<<"\nIngrese el segundo numero: ";
- cin>>b;
- B = mcd(a,b);
- cout<<"el Mcd es "<<B<<"\n";
- return0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement