Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  division-p67.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. divisions.
       Author. "Leutbecher".
      * ".. Zahlentheorie S. 67"  
       Data Division.
       Working-Storage Section.
         77 a  pic S9(8).
         77 b  pic S9(8).
         77 c  pic S9(8).
       Linkage Section.
         77 m  pic S9(8).
         77 n  pic S9(8).
         77 s  pic S9(8).
       Procedure Division using n m s.
      *  m € Z, n € N mit n>1 und n == 1(mod 2)
         compute a = function mod(m,n)
         move n to b
         move 1 to s
         if a=0 then move 0 to s end-if
         perform until a <= 1
           perform until function mod(a, 4)not=0
             divide 4 into a
           end-perform
           if function mod(a, 2)=0 then
             divide 2 into a
             if function mod(a, 8)=3 or =5 then
               move -s to s
             end-if
             move b to c
             move a to b
             move c to a
             if function mod(a, 4)=3 and function mod(b, 4)=3 then
               move -s to s
             end-if
             compute a=function mod(a,b)
             if a=0 then move 0 to s end-if
         end-perform  
      *  nun ist s=(m/n)
         Display "m="m" n="n" s="s
       End-Program divisions.

Messung
CHZG
1009910099

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,836
#Domains=906,750