ACP2_2

#include <stdio.h> void main() { struct book{ char title[20],author[30],pblctn[20]; int pages,pbyear,price; }book; clrscr(); printf("Book Details\n------------\nTitle : "); flushall(); gets(book.title); printf("Author : "); flushall(); gets(book.author); printf("Publisher : "); flushall(); gets(book.pblctn); printf("Pages : "); flushall(); scanf("%d",&book.pages); printf("Publishing Year : "); flushall(); scanf("%d",&book.pbyear); printf("M.R.P. (Rs.) : "); flushall(); scanf("%d",&book.price); clrscr(); printf("\nBook Details\n------------\nTitle\t\t : %s\n",book.title); printf("Author\t\t : %s\n",book.author); printf("Publisher\t : %s\n",book.pblctn); printf("Pages\t\t : %d\n",book.pages); printf("Publishing Year\t : %d\n",book.pbyear); printf("M.R.P. (Rs.)\t : %d",book.price); getch(); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.