QBASIC PROGRAM TO CHECK ELIGIBILTY TO DRIVE

QBASIC PROGRAM TO CHECK ELIGIBILTY TO DRIVE



 CLS
 INPUT “ENTER YOUR AGE”; A
 IF A >= 16 THEN
 PRINT “YOU ARE ELIGIBLE TO DRIVE”
 ELSE
 PRINT “ YOU ARE NOT ELIGIBLE TO DRIVE”
 END IF
 END

USING SUB


DECLARE SUB DRIVE(A)
 CLS
 INPUT “ENTER YOUR AGE”; A
 CALL DRIVE(A)
 END
 
 SUB DRIVE(A)
 IF A >= 16 THEN
 PRINT “YOU ARE ELIGIBLE TO DRIVE”
 ELSE
 PRINT “ YOU ARE NOT ELIGIBLE TO DRIVE”
 END IF
 END SUB

Post a Comment

0 Comments