improve book printouts

This commit is contained in:
ІО-23 Шмуляр Олег 2024-09-22 13:26:32 +03:00
parent 79e61a227c
commit c357c7c882
1 changed files with 4 additions and 6 deletions

View File

@ -36,12 +36,10 @@ new_book(char* name,
static void
print_book(struct BookNode* book)
{
printf("Book title: %s\n", book->name);
printf("- $%.2lf\n", (double) book->price / 100.0 );
printf("- %d pages\n", book->page_amount);
printf("- %c%c\n", book->language[0], book->language[1]);
printf("- %d g\n", book->weight);
printf("- Year: %d\n", book->year);
printf("Book title: \"%s\"\n", book->name);
printf("> $%.2lf - %d pages - %d g\n", (double) book->price / 100.0,
book->page_amount, book->weight);
printf("> %c%c - %d\n", book->language[0], book->language[1], book->year);
}
static void