From c357c7c882725fa9ae3962b9d6c5aa8755196b29 Mon Sep 17 00:00:00 2001 From: hasslesstech Date: Sun, 22 Sep 2024 13:26:32 +0300 Subject: [PATCH] improve book printouts --- src/main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index fbbbff8..b2f7423 100644 --- a/src/main.c +++ b/src/main.c @@ -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