// Pantea Aria // Struct and Enum // Imagine you are designing a program for a small library system. // Each book has: // - an ID number (int) // - a price (double) // - a category (enum book_type) that can be // FICTION, NONFICTION, or TEXTBOOK // // 0 for FICTION // 1 for NONFICTION // 2 for TEXTBOOK // // Task: // Define an enum and a struct to represent a book. // Then, create a book with ID 101, price 59.99, and category TEXTBOOK. // Finally, print the book’s details. enum book_type {FICTION, NONFICTION,TEXTBOOK }; struct book { int id; double price; enum book_type category; }; int main(void) { struct book my_book; // ID 101, price 59.99, and category TEXTBOOK. my_book.id = 101; my_book.price = 59.99; my_book.category = TEXTBOOK; // Finally, print the book’s details. printf ("the id of my book is %d\n", my_book.id); // your turn to continue }