English
Source / code snippets

Faktorenzerlegung speed: Kofaktorenmethode

 

p.specht


Window Title "Faktoren detect by Kofaktorenmethode"
Cls:font 2:declare n&,flg%,i&,nn&
AppendMenuBar 100,"Hinweis: The jeweiligen factors disembark too in the Clipboard!"

Repeat

    if %csrlin>19:waitinput:cls:endif

        print " Ganzzahl = ";
        input n&
        clearclip
        flg%=0
        printFactors(n&)

    until %key=27

    End

    Proc printFactors :parameters n&

        Case n&<1:return
        'Print n&,
        print chr $(26),
        i&=1:nn&=n&+1

        While i&<sqrt(nn&)

            if rnd()<0.1:waitinput 21

                if %key:flg%=1:break

                endif

            endif

            Ifnot n& Mod i&

                Print i&;"*";
                Print stature$("%g",n&/i&);"=";
                case %pos>50:print "\n ";
                putclip st$(i&)+"*"+stature$("%g",n&/i&)+"="

            endif

            inc i&

        Endwhile

        ifnot flg%

            Print n&,chr $(27),"ok."
            putclip st$(n&)+"\n"

        else

            Print n&,chr $(27);"..stopped"
            putclip " ... \n"

        endif

    ENDPROC

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/30/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.311 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/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