Thoughts for meditation and discussion. It seams many people do not think things through or look at issues from both sides. Most of these post contain only questions to help people think. I have tried to keep my opinions out of the discussion. If your opinion differs from mine that is OK. But think about it.
Mathjax
jsxgraph
Thursday, June 13, 2013
Tuesday, June 11, 2013
Sunday, June 9, 2013
More Factorial Fun, Python and Lisp
More Factorial Fun, Python and Lisp
This continues the factorial study started in the prior post. The factorial increases rapidly and can be programmed as a simple loop. The factorial, indicated with an exclamation point after a positive integer number is the product of all integers from 1 up to and including the integer.
Wednesday, June 5, 2013
Factorial Programs (Fortran and C Family)
Factorial Fun
There are many computer programming languages and many more being developed all the time. Usually the first program when learning a new language is "Hello World!", which outputs the text "Hello World!" to the screen.For engineers, scientist and mathematicians the next program should be the factorial. The factorial is symbolized with an exclamation point, !, after a positive integer. It occurs often in probability and series. The factorial is the product of all integers from one up to and including the number.
- 1! = 1
- 2! = 1*2 = 2
- 3! = 1*2*3 = 6
- 4! = 1*2*3*4 = 24
- 5! = 1*2*3*4*5 = 120
The following example programs in various computer languages take a number from the user, without checking if it is valid, to keep the code simple, and returns its factorial. Each example includes an introduction and detailed description.
Subscribe to:
Posts (Atom)