// Pantea Aria // Imagine you are designing a program for a small library system. // Each book has an ID number (an int), // a price (a double), // and a category (a char) that tells you whether the book is // fiction ('F'), // non-fiction ('N'), // or a textbook ('T'). // Write a program to store the information of one book: // "C Programming Basics", which is a textbook with ID 1091 and costs 59.99. // define your new type - only declaration // struct book struct book { int id; double price; char category; }; // we have not declared a variable of type struct book yet #include int main(void) { // declare a variable of type book struct book new_book, old_book; // textbook with ID 1091 and costs 59.99. new_book.id = 1091; new_book.price = 59.99; new_book.category = 'T'; // print out double the price of this book printf("double the price is %lf\n", new_book.price * 2); }