33,544 views
5 votes
5 votes
Re-write the given program after correcting the bugs.

REM to add record in an existing file
CLS
OPEN "Record.Dat" FOR OUTPUTAS #1
AA:
INPUT "Enter Name, Class and Roll No. ";- -Nm$, Cl, Rn
INPUT #2, Nm$, Cl, Rn
INPUT "More records"; Y$
IF UCASE$(Y$)= "Y" THEN GOTO aa
CLOSE "Rrecord.dat"
END​

User Crys
by
2.9k points

1 Answer

10 votes
10 votes

Answer:

Step-by-step explanation:

REM to add record in an existing file

CLS

OPEN “Record.Dat” FOR APPEND AS #1

AA:

INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn

WRITE #1, Nm$, Cl, Rn

INPUT “More records”; Y$

IF UCASE$(Y$)=”Y” THEN GOTO AA

CLOSE # 1

END

User Astroanu
by
3.3k points