Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- int m, n, rem;
- printf("Enter two numbers consecutively(with a space between them): ");
- scanf("%d %d", &m, &n);
- while (m)
- {
- rem = m;
- m = n % rem;
- n = rem;
- }
- printf("%d is the GCD\n", n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement