79416868

Date: 2025-02-06 05:35:49
Score: 1
Natty:
Report link
void printBinary(int n, int bits) {
  for (int i = bits - 1; i >= 0; i--) {
    int bit = (n >> i) & 1;
    printf("%d", bit);

    // Add a space after every 4 bits, except after the last group
    if (i % 4 == 0 && i != 0) {
      printf(" ");
    }
  }
  printf("\n");
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: User_T