Friday, October 18, 2019

167. Qbasic sequential file handling to display all the information of employee whose salary is greater than 15000 and less than 40000

167.A data file “Salary.Dat” contains the information of employee regarding their name, post and salary. Write a program to display all the information of employee whose salary is greater than 15000 and less than 40000.
OPEN "EMP.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
  INPUT #1, N$, P$, S
    IF S >= 15000 AND S <= 40000 THEN PRINT N$, P$, S
WEND
CLOSE #1
END

No comments:

Post a Comment