Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/COBOL/verschiedene-Autoren/Wirth/   (verschiedene Autoren Version 0.7©)  Datei vom 4.1.2008 mit Größe 913 B image not shown  

Quelle  sort-array.cob

  Sprache: Cobol
 

       identification division.
       program-id. sort-array.
      *  aus Wirth, systematisches Programmieren p. 84 
       author"JD".
       date-written11.9.2005.
       date-compiled.
       data division.
       working-storage section.
       78 n   pic 9(4value 10.
       77 s   pic 9(4)V9(4).
       77 u   pic 9(4)V9(4).
       77 h   pic 9(4).
       77 j   pic 9(4).
       77 k   pic 9(4).
       linkage section.
       77 x   pic 9(4)V9(4occurs n.
       procedure division using x.
      * sort array x
         perform varying h from 1 by 1 until h >=n - 1
           move h to j
           perform varying k from h+1 by 1 until k>=n
             if x(k) > x(j) then move k to j
           end-perform
           move x(h) to u
           move x(j) to x(h)
           move u to x(j)
         end-perform
         display "sorted"
      * now x is sorted
        end-program  sort-array.

Messung V0.5 in Prozent
C=82 H=97 G=89

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-15) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.