AnswerBox
C

GCD Using Recursion

Description:
Find GCD using the Euclidean algorithm.
C Code
#include <stdio.h>
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
    printf("GCD of 48 and 18: %d\n", gcd(48, 18));
    return 0;
}
Expected Output
GCD of 48 and 18: 6