English
Experimente

Chinesischer Restsatz - one Anwendungsbeispiel moreover

 

p.specht

Chinesischer Restsatz
================
One Kleinlaster drives inadvertently whom stall of/ one biederen Bauersfrau circa. The driver is integrally zerknirscht and offer, The zerbrochenen eggs financial To supplant. Unglücklicher point white The Bäuerin not The detailed number, she knows only yet, that they Dreiergruppen counted has, there stayed 2 eggs over, in Fünfergruppen stayed 3 over, therefore has tappt im dunkeln then Siebenerpackungen chosen, but it stayed again 2 eggs over. "Moment: The Gruppengrößen having none joint Teiler - then having we the same." means the driver, consider short and says then: "Ich guilt them money for 23 eggs, and the stood place so did i again on!". How coming it hereon? having it Perhaps already the nachstehende Program?
Windowtitle "Modulo-Kongruenzsystem, here: Chinesischer Restsatz "+\
"With Probiermethode to Prof. Weitz"'(D) demonstration 2017-11 by P.woodpecker, Wien
'Q: https://www.youtube.com/watch?v=0KUDo0Bk  : OHNE EACH GEWÄHR!
Windowstyle 24:cls rgb(200,200,255):font 2:declare k&,i&,j&,flg&,n!,X!,w$
Print "\n  Wieviele Kongruenzen?: ";:input k&
declare m&[k&],a&[k&],x![k&],n![k&]:print

if k&=3:m&[1]=3:a&[1]=2:m&[2]=5:a&[2]=3:m&[3]=7:a&[3]=2:endif' Schnelltest: x = 23

    Whileloop k&:i&=&Loop: hoppla:

        Print " ";i&;". Kongruenz:  Module?: ";:input w$:case (k&=3) and (w$=""):break

        if w$="":locate %csrlin-1,1:sound 80,50:goto "hoppla":endif

            m&[i&]=val(w$):locate %csrlin-1,40:Print " remainder?: ";::input w$:a&[i&]=val(w$)

        endwhile

        n!=1:whileloop k&:i&=&Loop:n!=n!*m&[i&]:endwhile
        :whileloop k&:i&=&Loop:x![i&]=n!/m&[i&]:endwhile

        whileloop k&:i&=&Loop:flg&=1

            whileloop m&[i&]-1:j&=&Loop

                ifnot (j&*x![i&]-1) mod m&[i&]:n![i&]=j&:flg&=0:break:endif

                endwhile

                if flg&:print "\n *** Error: Module ";m&[i&];" not berechenbar! ***"

                    sound 200,200:waitinput:end:endif

                endwhile

                X!=0:whileloop k&:i&=&Loop:x!=x!+a&[i&]*x![i&]*n![i&]:endwhile
                x!=x! mod n!'Normierte Solution spend:
                print "\n Result: X = ";stature$("%g",x!);"     \n\n Probe: \n"

                whileloop k&:i&=&Loop

                    print "                                          ":locate %csrlin-1,2
                    print stature$("%g",x!);" mod ";m&[i&];" = ";tab(20);stature$("%g",x! mod m&[i&]);" "
                    endwhile:sound 50,50:print "\n OK ?"
                    waitinput
                    End
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/25/21  
 



Zum Experiment


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

984 Views

Untitledvor 0 min.
Member 640534304/16/22
Stringray01/05/22
p.specht07/28/21
Ernst07/21/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