Breaking News

write a program to store std.dat name, class, phone, roll, address in a sequential data file std.dat for class 10 see, class 9

 write a program to store std.dat name, class, phone, roll,

address in a sequential data file std.dat

OPEN"STD.DAT" FOR OUTPUT AS #1

CLS

INPUT"NAME:";N$

INPUT" CLASS:";C$

INPUT"PHONE";P

INPUT"ROLL";R

INPUT"ADDRESS";A$

WRITE #1,N$,C$,P,R,A$

CLOSE #1

END

wap TO create data file std.dat to store student NAME, age,

gender and roll , to ask the user to enter another record.

OPEN "STD.DAT" FOR OUTPUT AS #1

CLS

DO

INPUT"ENTER STD NAME";N$

INPUT "ENTER STD AGE";A$

INPUT"GENDER";G$

INPUT"ROLL NO";R

WRITE #1,N$,A$,G$,R

INPUT " DO YOU WANT TO ENTER MORE RECORD ?

Y/N";CH$

LOOP WHILE UCASE$ (CH$)="Y"

CLOSE #1

END

No comments