Saturday, March 10, 2018

Qbasic Program that stores system date in a variable and displays the month in word.

Qbasic Program that stores system date in a variable and displays the month in word.

CLS
a = VAL(LEFT$(DATE$, 2))
SELECT CASE a
    CASE 1
        PRINT "Current Month is January"
    CASE 2
        PRINT "Current Month is Feburary"
    CASE 3
        PRINT "Current Month is March"
    CASE 4
        PRINT "Current Month is April"
    CASE 5
        PRINT "Current Month is May"
    CASE 6
        PRINT "Current Month is June"
    CASE 7
        PRINT "Current Month is July"
    CASE 8
        PRINT "Current Month is August"
    CASE 9
        PRINT "Current Month is September"
    CASE 10
        PRINT "Current Month is October"
    CASE 11
        PRINT "Current Month is November"
    CASE 12
        PRINT "Current Month is December"
    CASE ELSE
        PRINT "Wrong Entry"
END SELECT
END


2 comments: