WAP TO create data file std.dat to store std name, marks obtained in science, English, maths of five students.
WAP TO create data file std.dat to store std name, marks
obtained in science, English, maths of five students.
OPEN "STD.DAT" FOR OUTPUT AS #1
CLS
FOR I=1 TO 5
INPUT"STD NAME";N$
INPUT"ENTER MARKS OF SCIENCE";S
INPUT"MARKS OF ENGLISH ";E
INPUT"MARKS OF MATHS:";M
WRITE #1,N$,S,E,M
NEXT
CLOSE #1
END
A SEQUENTIAL FILE CALLED STD.DAT HAS STORED
INFORMATION NAME, MARKS OF SCIENCE ENGLISH
AND MATH DISPLAY THEM.
OPEN "STD.DAT" FOR INPUT AS #1
INPUT #1,N$,S,E,M
PRINT "STD NAME";N$
PRINT"MARKS OF SCIENCE";S
PRINT"MARKS OF ENFLIHSH";E
PRINT "MARKS OF MATHS";M
CLOSE #1
END
No comments