Category : BASIC Source Code
Archive   : LB09D.ZIP
Filename : FOR_NEXT.BAS

 
Output of file : FOR_NEXT.BAS contained in archive : LB09D.ZIP

PRINT"Compute a Factorial"
INPUT"Enter a number"+">"; start
factorial = 1
FOR index = 1 TO start
factorial = factorial * index
NEXT index
PRINT"The factorial of "; start; " is "; factorial

PRINT

PRINT"Compute a Reciprocal"
INPUT">"; start
PRINT"The reciprocal of "; start; " is "; 1/start

PRINT

PRINT"Compute a Square"
INPUT">"; start
PRINT"The square of "; start; " is "; start*start

FOR x = 1 TO 5 STEP .3
PRINT x*x
NEXT x



  3 Responses to “Category : BASIC Source Code
Archive   : LB09D.ZIP
Filename : FOR_NEXT.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/