QBASIC PROGRAM TO PRINT ODD NUMBERS FROM 1 TO 30
CLS
FOR I = 1 TO 30 STEP 2
PRINT I,
NEXT I
END
USING SUB
DECLARE SUB ODD()
CLS
CALL ODD
END
SUB ODD
FOR I = 1 TO 30 STEP 2
PRINT I,
NEXT I
END SUB
CLS
FOR I = 1 TO 30 STEP 2
PRINT I,
NEXT I
END
DECLARE SUB ODD()
CLS
CALL ODD
END
SUB ODD
FOR I = 1 TO 30 STEP 2
PRINT I,
NEXT I
END SUB
0 Comments