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