Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int mdc(int x , int y)
- {
- if (y == 0) return x ;
- else mdc (y , x % y) ;
- }
- void main ()
- {
- int x , y ;
- printf ("Escreva dois números para descobrir o mínimo divisor comum: ") ;
- scanf ("%d %d" , &x , &y) ;
- printf ("MDC : %d\n" , mdc(x , y)) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment