Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE FUNCTION Fact# (aValue AS DOUBLE)
- DIM X AS DOUBLE, L AS DOUBLE, N AS DOUBLE, I AS DOUBLE
- INPUT "Input X: ", X
- INPUT "Input N: ", N
- L = 1
- FOR I = 1 TO N
- L = L + X ^ I \ Fact(I)
- NEXT I
- PRINT "F ="; L
- FUNCTION Fact# (aValue AS DOUBLE)
- DIM Result AS DOUBLE, I AS INTEGER
- Result = 1
- FOR I = 1 TO aValue
- Result = Result * I
- NEXT I
- Fact = Result
- END FUNCTION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement