//this is a program to accept the book details and display them
#include<stdio.h>
#include<conio.h>
void main()
{
struct book
{
char name[20];
char author[20];
int price;
}b;
printf("\n\nEnter the Name, Author and Price of the book: ");
scanf("%s%s%d",b.name,b.author,&b.price);
//displaying the details
printf("\n\nName of Book=%s\n\nAuthor=%s\n\nPrice=%d",b.name,b.author,b.price);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
struct book
{
char name[20];
char author[20];
int price;
}b;
printf("\n\nEnter the Name, Author and Price of the book: ");
scanf("%s%s%d",b.name,b.author,&b.price);
//displaying the details
printf("\n\nName of Book=%s\n\nAuthor=%s\n\nPrice=%d",b.name,b.author,b.price);
getch();
}