Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int gcd(int a, int b) {
- if (b == 0) return a;
- return gcd(b, a % b);
- }
- int main() {
- for (int a = 10; a <= 15; a++) {
- for (int b = 16; b <= 20; b++) {
- printf("a=%d b=%d gcd(a, b)=%d\n", a, b, gcd(a, b));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement