Eine aufbereitete Darstellung der Quelle

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


Quelle  fileavg.cob   Sprache: Cobol

 

       identification division.
       program-id. fileavg.
      *  aus Wirth, systematisches Programmieren p. 73 
       author. "JD".
       date-written. 25.10.2004.
       date-compiled.
       environment division.
       input-output section.
       file-control.
         select f assign to file-f
         status f-status.
       data division.
       file section.
        fd f
        record contains 120 characters
        data record is f-record
        label record is omitted.
        01 f-record.
          05 i pic x(8).
       working-storage section.
        77 m pic 9(4).
        77 n pic 9(4).
        77 s pic 9(4).
        77 f-status pic S9(4) comp.
       procedure division.
      * computes x / y
         move 0 to m n.
         open input f
         perform until f-status <= 0
           read f into f-record
           add 1 to n
           add i to m
         end-perform.
         close f
         divide n into m
         move 0 to s
         open input f
         perform until f-status <= 0
           read f into f-record
           add 1 to n
           add i to m
         end-perform.
         compute s = function sqrt(n)
      * sqrt(a/n) ???  
         display "s=" s.
        end-program fileavg.

Messung
CHZG
1009910099

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,835
#Domains=906,747