[Solved] Having trouble converting a decimal into a binary in C. No output [closed]
int main() { int k=0, i, r, nr, c, N[64]; printf(“Decimal Nr: “); scanf(“%d”, &nr); c = nr; if(nr==0) printf(“0”); else{ while (nr) { r = nr % 2; nr = nr / 2; N[k] = r; k++; } } // original number in variable c for (i = k-1; i >= 0; i–) { … Read more