Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

factorial problems

$
0
0
I am currently busy on a script that is supposed to be used for calculating the factorials of given numbers this is the current script.
[ autoit ]      
$faculteit = faculteit(26) msgbox (0, "", $faculteit) Func faculteit($nummer) Local $n = 1 For $i = 1 to $nummer $n = $n*$i Next If $n = 0 Then SetError ( 1 ) Return 1 Else Return $n EndIf EndFunc
The problem is this works fine until it goes up to 26! then the numbers start going all wrong.
Anybody know what's causing this problem?

Thanks for your time

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>