Skip to main content
SEE CS 2083 LEARN • PRACTICE • SUCCEED 🔍

Friday, October 18, 2019

📚 SEE COMPUTER SCIENCE • CDC 2083

159. Qbasic sequential file handling to read all the records and print those with address “NEPAL” and age >15

📅 Updated learning resource Quick read 📱 Mobile friendly
159.A data file “INFO.DAT” has numerous records in it with name, address age, and telephone numbers in it. Write a program to read all the records and print those with address “NEPAL” and age >15
OPEN "INFO.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
  INPUT #1, A$, B$, C, D
    IF UCASE$(B$) = “NEPAL” AND C >15 THEN PRINT A$, B$, C, D
WEND
CLOSE #1
END

No comments:

Post a Comment

Home 📖Chapters 🎯Quiz MCQs 🔍Search