Home  |  IT Zone  |  Tips / Tricks  |  Did You Know  |  Inspirational  |  Health  |  World Infos  |  Insurance  |  Universities  |  Forex  |  Mathematics  |  Illusions  |  Children Day Quotes  |  Fun / Jokes  |  Decent Quotes  |  Birthday Msgs  |  Good Morning Msgs  |  Good Night Msg  |  Husband Wife Jokes  |  Teacher Students Jokes  |  Insult Jokes  |  Love Quotes  |  Sad Quotes  |  Funny Pics  |  Be Aware  |  Articles  |  Simple Joys of Life 

A program to create a data file STD.DAT which stores Roll number, Name, Class and age of student. (Qbasic)

  • Write a program to create a data file "STD.DAT" which stores Roll number, Name, Class and age of student. Age of students must be from 15 to 19. (Qbasic)
CLS
OPEN "STD.DAT" FOR OUTPUT AS #1
INPUT "Enter Roll number"; R
INPUT "Enter Name"; N$
INPUT "Enter Class"; C$
1:
INPUT "Enter Age (15 to 19)"; A
IF A >= 15 AND A <= 19 THEN
    WRITE #1, R, N$, C$, A
ELSE
    PRINT "Please enter correct age"
    GOTO 1
END IF
CLOSE #1
END

Share :

Twitter
Back To Top

facebook main

Powered by Blogger.