To display the series- 7, 5, 3, 2 (Qbasic Code)

To display the series- 7, 5, 3, 2 (Qbasic Code)
  •  CLS
    FOR i = 10 TO 1 STEP -1
        FOR j = 1 TO i
            r = i MOD j
            IF r = 0 THEN c = c + 1
        NEXT j
        IF c = 2 THEN PRINT i;
        c = 0
    NEXT i
    END

Share :

Facebook Twitter Google+
Back To Top

facebook main

counter

Powered by Blogger.