English
Source / code snippets

Multinomialkoeffizient (n over k1,k2,...)

 

p.specht

for the application the Formel of Faa di Bruno  [...]  was one Multinomialkoeffizient to program. Klappt integrally well, because Bereichsüberschreitungen weitestgehend vermieden go.
Window Title " M u L T I n O M I A L k O E F F I Z I E n T"
declare w$,z$[],anz&[],c$,i&,n&,flg&:CLS:font 2
print "\n The procedure accounts The amount different aussehender \n"
print " orders all characters, where some characters too repeatedly\n"
print " appear (= groups un-unterscheidbarer characters form) can.\n"
again:
Print "\n\n give tappt im dunkeln a Zeichenkombination one: ";:input w$:case w$="":end:n&=-1

Whileloop len(w$):c$=mid$(w$,&Loop,1):flg&=1

    whileloop 0,n&:i&=&Loop:if z$[i&]=c$:anz&[i&]=anz&[i&]+1:flg&=0:break:endif

        endwhile:if flg&:inc n&:z$[n&]=c$:anz&[n&]=1:endif
        endwhile:print
        :whileloop 0,n&:print " ";z$[&Loop];" comes ";anz&[&loop];" time to.":endwhile
        print "\n therefore there ";
        print stature$("#################",multinomkoeff(len(w$),n&,anz&[]));" unterscheidbare orders!"
        waitinput:cls:goto "nochmal"

        proc multinomkoeff :parameters k&,n&,anz&[]:declare p!:p!=1

            :whileloop 0,n&:whileloop anz&[&Loop]:p!=p!*k&/&Loop
            dec k&:endwhile:endwhile:return p!

        endproc

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/20/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.547 Views

Untitledvor 0 min.
p.specht11/21/21
R.Schneider11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie