To create a serial file having variable name, department and telephone number. (Qbasic)

  • Write a program to create a serial file having variable name, department and mobile number. Mobile number should be in between 1000000000 to 9999999999. (Qbasic)
CLS
OPEN "RECORD.DAT" FOR OUTPUT AS #1
INPUT "Enter name"; N$
INPUT "Enter department"; D$
1:
INPUT "Enter mobile number "; T
IF T > 9000000000 AND T < 9999999999 THEN
    WRITE #1, N$, D$, T
ELSE
    PRINT "Wrong mobile number"
    GOTO 1
END IF

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.