156.Write a program which reads records from the file
”Result.DAT” having the fields name, and marks of three different subjects and
display only those records whose percentage is greater than 60 and less than
80. Also count the total number of records presenting in that data files.
OPEN
"STD.TXT" FOR INPUT AS #1
CLS
WHILE
NOT EOF (1)
INPUT #1, B$, C, D, E
A=A+1
T=C+D+E
P=T/3
IF P > 60 AND P < 80 THEN PRINT B$, C, D, E
WEND
PRINT
“TOTAL NO. OF RECORDS=”; A
CLOSE
#1
END
No comments:
Post a Comment