AnswerBox
C

Decimal to Binary

Description:
Convert a decimal number to binary.
C Code
#include <stdio.h>
void decToBin(int n) {
    if (n > 1) decToBin(n / 2);
    printf("%d", n % 2);
}
int main() {
    printf("Binary of 25: ");
    decToBin(25);
    printf("\n");
    return 0;
}
Expected Output
Binary of 25: 11001