improve book printouts
This commit is contained in:
parent
79e61a227c
commit
c357c7c882
10
src/main.c
10
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
|
||||
|
|
Loading…
Reference in New Issue