Eine aufbereitete Darstellung der Quelle

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


Quelle  min-p161.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. divisio.
       Author. "Owicki/Gries".
      * ".. Informatik-Handbuch Rechenberg/Romberger"  
       Data Division.
       Working-Storage Section.
         78 n       value 100.
         77 i       pic S9(8).
         77 j       pic S9(8).
         77 k       pic S9(8).
         77 eventop pic S9(8).
         77 oddtop  pic S9(8).
       Linkage Section.
         01 array occurs n.
           05 min pic S9(8) occurs n.
       Procedure Division using n m s.
      *  Berechnung von Quotient und Rest
         move 1 to i
         move 2 to j
         compute oddtop  = n+1
         compute eventop = n+1
         perform until i >= min(oddtop,eventop)
           if a(i)>0 then move i to oddtop
           else           add 2 to i
         end-perform  
         perform until j >= min(oddtop,eventop)
           if a(j)>0 then move i to eventop
           else           add 2 to j
         end-perform  
         move min(oddtop,eventop) to k
      *  nun ist der kleinste Index in k
       End-Program divisio.

Messung
CHZG
1009910099

¤ Dauer der Verarbeitung: 0.11 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