Saturday, December 28, 2019

5.WAP to store the information of book's name and writer's name, price and quantity in a sequential data file called "RECORD.DAT"

Ans



   CLS
   OPEN "RECORD.DAT" FOR OUTPUT AS #1
   TOP:
   INPUT "ENTER BOOK'S ID";ID
   INPUT "ENTER BOOK'S NAME";BN$
   INPUT "ENTER AUTHOR'S NAME";AN$
   INPUT "ENTER PRICE";P
   INPUT "ENTER QUANTITY"; Q
   WRITE #1, ID,BN$,AN$,P,Q
   INPUT "DO YOU WANT TO CONTINUE?";CH$
   IF UCASE$(CH$)= "Y" THEN GOTO TOP
   CLOSE #1
   END

No comments:

Post a Comment

File Handling

Introduction:- Data are used in all the programs for retrieving information. In QBASIC you can store data in a separate file called a da...