home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 3
/
CDASC03.ISO
/
news
/
1601
/
for_next.bas
< prev
next >
Wrap
BASIC Source File
|
1993-04-01
|
537b
|
26 lines
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