Monday, February 5, 2018

Qbasic File Handling Program to delete records whose bus stoppage is "Bhaktapur"





OPEN "Busrider.inf" FOR INPUT AS #1
OPEN "temp.inf" FOR OUTPUT AS #2
CLS
WHILE NOT EOF(1)
    INPUT #1, bn, n$, c, b$
    IF UCASE$(b$) <> "BHAKTAPUR" THEN
        WRITE #2, bn, n$, c, b$
    ELSE
        PRINT "Data Deleted"
    END IF
WEND
CLOSE
KILL "Busrider.inf"
NAME "temp.inf" AS "Busrider.inf"

END


No comments:

Post a Comment