152.Store SIDNO,
name, address and Telephone number of five students and display the records on
monitor in sequential data file “STDINFO”
OPEN
"STDINFO.DAT" FOR OUTPUT AS #1
FOR
I = 1 TO 5
INPUT "ENTER NAME"; N$
INPUT "ENTER ADDRESS"; A$
INPUT "ENTER TELEPHONE"; T#
WRITE #1, N$, A$, T#
NEXT
I
CLOSE
#1
OPEN
"STDINFO.DAT" FOR INPUT AS #1
CLS
FOR
I = 1 TO 5
INPUT #1, N$, A$, T#
PRINT N$, A$, T#
NEXT
I
CLOSE
#1
END
No comments:
Post a Comment