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

Quelle  exp-p56.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. divisions.
       Author. "Leutbecher".
      *        Zahlentheorie S. 56 
       Data Division.
       Working-Storage Section.
         77 e  pic S9(8).
         77 y  pic S9(8).
       Linkage Section.
         77 x  pic S9(8).
         77 n  pic S9(8).
         77 p  pic S9(8).
       Procedure Division using x n returning p.
      *  computes p = x**n
         move n to e
         move x to y
         move 1 to p
         perform until e <= 0
           if function mod(e, 2)=1 then
             multiply p by y
           end-if
           multiply y by y
           divide 2 into e
         end-perform  
      *  now y = x ** n
       End-Program divisions.

Messung
CHZG
1009910099

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland