A sequential data file "birth.dat" contains number of records having field name as Name, DOB and address. Write a program to display the record whose date of birth is the current month.
OPEN "birth.dat" FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, n$, d$, a$
b$ = LEFT$(DATE$, 2)
c = VAL(b$)
e$ = LEFT$(d$, 2)
f = VAL(e$)
IF c = f THEN PRINT n$, d$, a$
WEND
CLOSE #1
END
SEE Computer Science Specification Table 2076, Networking and Telecommunication, Ethical and Social Issues in ICT, Computer Security, E-Commerce, Contemporary Technology, Number System, Database Management System (MS Access), Modular Programming, Sequential File Handling, C Programming Basics, SEE Computer E-Book Grade IX and X
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment