program to calculate formula in BASIC

March 10, 2011 at 06:45:40
Specs: Windows XP, 1 GB
how can i write a program in GW-BASIC to calculate and print following formula using user-defined function

See More: program to calculate formula in BASIC

Report •

March 10, 2011 at 07:23:47
What is meant by "user-defined function"? Do you mean user input?

Please define this using known math symbols "n!?k!". I do not know what a ? is mathematically.

As far as doing factorials in basic you do them like...

' Initialize the variables
Dim counter As Integer : counter = 5
Dim factorial As Long : factorial = 1

Do While counter > 0
factorial = factorial * counter ' Multiply
counter = counter - 1 ' Decrement

Print factorial ' Prints out the result.

Report •
Related Solutions

Ask Question