Back To C++ Structures
//program to create a structure book with members (bookid,bookname,author and price) and input values from user and then display the values #include
#include
struct book { int bookid; char bookname[20]; char author[20]; float price; }; void main() { book b; //variable of structure book created clrscr(); cout<<"\nenter bookid "; cin>>b.bookid; cout<<"\nenter book name "; cin>>b.bookname; cout<<"\nenter book author "; cin>>b.author; cout<<"\nenter price of book "; cin>>b.price; cout<<"\ndispalying the values \n"; cout<<"\nbook id is "<