products/Sources/formale Sprachen/Cobol/verschiedene-Autoren/Sedgewick-Algorithmen image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: simpson.cob   Sprache: Cobol

Original von: verschiedene©

       Identification Division.
       Program-Id. simpson.
       Data Division.
       Working-Storage Section.
         77 w     pic 9(4)V9(2).
         77 i     pic 9(4).
       Linkage Section.
         77 a     pic 9(4)V9(2).
         77 b     pic 9(4)V9(2).
         77 n     pic 9(4).
         77 r     pic 9(4)V9(2).
         77 p1    pic 9(4)V9(2).
         77 p2    pic 9(4)V9(2).
         77 p3    pic 9(4)V9(2).
         77 r1    pic 9(4)V9(2).
         77 r2    pic 9(4)V9(2).
         77 r3    pic 9(4)V9(2).
       Procedure Division using a b n r.
        move 0 to r
        compute w=(b-a)/n
        perform varying i from 1 until i=n
          compute p1=a+(i-1)*w
          call f using p1 r1
          compute p2=a-w/2+i*w
          call f using p2 r2
          compute p3=a+i*w
          call f using p3
          compute r=r+w*(r1+4*r2+r3)/6
        end-perform
       End-Program simpson.  

¤ Dauer der Verarbeitung: 0.24 Sekunden  (vorverarbeitet)  ¤





Kontakt
Drucken
Kontakt
sprechenden Kalenders

in der Quellcodebibliothek suchen




schauen Sie vor die Tür

Fenster


Die Firma ist wie angegeben erreichbar.

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff