decToBin
unknown
c_cpp
2 years ago
246 B
16
Indexable
void decToBinRec(unsigned int n){ if (n != 0){ decToBinRec(n / 2); if (n % 2 == 0) printf("%d", 0); else printf("%d", 1); } } void decToBin(unsigned int n){ if (n == 0) printf("%d", 0); decToBinRec(n); }
Editor is loading...