Skip to content

Commit

Permalink
Print N/A if --ids is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Oct 28, 2024
1 parent 0fb4f3a commit 1d2b12a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ int main(int argc, char *argv[]) {
}
}

// If array is empty
if (idsCount == 0) {
// Print "N/A"
printf("N/A");
}

// Print the count of elements in the array and newline character
printf(" (%zu)\n", idsCount);
}
Expand Down

0 comments on commit 1d2b12a

Please sign in to comment.