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

Quelle  Indu4-p475.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. Indu2.
      * Buch "Verification of Object Oriented Software", 2007
      * Proving by Induction, p475
      * von Angela Wallenberg
       Data Division.
       Working-Storage Section.
         77 i            pic 9(4).
         77 n            pic 9(4).
         77 rl           pic 9(4).
       Linkage Section.
         77 nl           pic 9(4).
         77 kl           pic 9(4).
         77 r            pic 9(4).
       Procedure Division using nl kl returning r.
      * Induction Formula
        compute i=nl-kl 
        move nl to n
        move rl to r
        perform until i>=n
          add 1 to i
          compute r=r+i*i*i
        end-perform.
      * 4*r = nl**2*(nl+1)**2
       End-Program Indu2.

Messung
CHZG
1009910099

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

*© Formatika GbR, Deutschland