I did not find the correct translation for the german mathematical expression "Fakultät"
which means
mathematics
Product, the factors of which are formed by the structure of the natural number series, starting with 1 (symbol:!; E.g. 1 · 2 · 3 · 4 · 5 = 5!)
Is it faculty? Websters Encylopidea does not show it as mathematical...
What ever....
I tried it with a simple code (see below) to calculate it - but now there are other questions of principle for me:
a) How can you best ensure that
only whole numbers >0 (no text, no zeros, no broken numbers etc) are allowed for input
(only 1, 2, 3 ff.are allowed) but only up to the limit,
which VFP for the maximum possible visual display of large numbers?
(for example eg. when input for m.mynumber = 1000 the result is toö big - and VFP shows this.
b) Can I prevent an input which leads to such a "******"-display by code when I do not try it before what the max. Input must be?
Thanks
Klaus
Peace worldwide - it starts here...
which means
mathematics
Product, the factors of which are formed by the structure of the natural number series, starting with 1 (symbol:!; E.g. 1 · 2 · 3 · 4 · 5 = 5!)
Is it faculty? Websters Encylopidea does not show it as mathematical...
What ever....
I tried it with a simple code (see below) to calculate it - but now there are other questions of principle for me:
a) How can you best ensure that
only whole numbers >0 (no text, no zeros, no broken numbers etc) are allowed for input
(only 1, 2, 3 ff.are allowed) but only up to the limit,
which VFP for the maximum possible visual display of large numbers?
(for example eg. when input for m.mynumber = 1000 the result is toö big - and VFP shows this.
b) Can I prevent an input which leads to such a "******"-display by code when I do not try it before what the max. Input must be?
Thanks
Klaus
Code:
*Faculty.prgThis program calculates faculties of a given number
*In this example the result of 5! will be calculated
CLEA
m.mynumber = 5 &&this number is the basis for 5!
m.z = 1
FOR x = m.mynumber TO 1 STEP -1
m.z=x*m.z
ENDFOR
? "The faculty of ",ALLTRIM(STR(m.mynumber))+"!", " = ",m.z
Peace worldwide - it starts here...