Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char const *argv[])
- {
- int a, b;
- printf("Введите a и b:\n");
- scanf("%d%d", &a ,&b);
- printf("НОД(%d, %d) = ", a, b);
- while(a != 0 && b != 0)
- if(a > b) a %= b;
- else b %= a;
- printf("%d\n", a + b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement