158.A data file "pabson.txt"
contains the records composed of the fields like school, principal, address,
contact. Write a program in Qbasic to display records of the schools located in
either Kathmandu or Palpa
OPEN
"PABSON.TXT" FOR INPUT AS #1
CLS
WHILE
NOT EOF (1)
INPUT #1, A$, B$, C$, D
IF UCASE$(C$) = “KATHMANDU” OR UCASE$(C$) =
“PALPA” THEN PRINT A$, B$, C$, D
WEND
CLOSE
#1
END
No comments:
Post a Comment