Page

Monday, 3 September 2018

program for book information in c

#include<stdio.h>
#include<conio.h>
struct book
{
int b_num;
char a_name[30],publish[40];
float rate;
};
struct book z;
int main()
{
clrscr();
printf("\n enter the year of publication:");
scanf("%d",&z.b_num);
printf("\n enter the name of the author:");
scanf("%s",&z.a_name);
printf("\n enter the name of the publisher:");
scanf("%s",&z.publish);
printf("\n enter the price of the book:");
scanf("%f",&z.rate);
printf("\n....................");
printf("\n Book Information");
printf("\n....................");
printf("\n Book publish in=%d",z.b_num);
printf("\n Author name=%s",z.a_name);
printf("\n Publisher=%s",z.publish);
printf("\n price of the book=%f",z.rate);
printf("\n....................");
getch();
return(0);
}




No comments:

Post a Comment