Program for Odd & Even number in QBASIC
CLS
INPUT "Enter a number"; n
IF (n MOD 2 = 0) THEN
    PRINT "Even Number"
ELSE
    PRINT "Odd Number"
END IF
END





Program for Odd Number using MOD Loop in QBASIC
CLS
PRINT "Odd number from 10 to 50"
FOR a = 10 TO 50
    IF (a MOD 2 = 1) THEN
        PRINT “Odd Number”; a
    END IF
NEXT a





Program for Even Number using MOD & Loop in QBASIC
CLS
PRINT "Even number from 10 to 50"
FOR a = 10 TO 50
    IF (a MOD 2 = 0) THEN
        PRINT “Even Number”; a
    END IF
NEXT a





Program for Even & Odd Number using MOD & loop in QBASIC
CLS
PRINT "ODD and Even Number between 1 to 10"
FOR n = 1 TO 10
    IF (n MOD 2 = 1) THEN
        PRINT "Odd Number"; n
    ELSE
        PRINT "Even Number"; n
    END IF
NEXT n