Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int MCD(int a,int b){
- if(a == 0)
- return b;
- return MCD(b % a,a);
- }
- int main()
- {
- int a,b;
- printf("Ingrese un numero ");
- scanf("%i",&a);
- printf("Ingrese otro numero ");
- scanf("%i",&b);
- int maximoComunDivisor = MCD(a,b);
- printf("El maximo comun divisisor es %i ",maximoComunDivisor);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement