fork download
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. IDEONE.
  3. ENVIRONMENT DIVISION.
  4. DATA DIVISION.
  5. WORKING-STORAGE SECTION.
  6. 01 a Pic x(46) value "The Cobol Add And Multiply Program.".
  7. 77 b Pic zz9.
  8. 77 c Pic zzz9.
  9. 77 n PIC Z9 .
  10. PROCEDURE DIVISION.
  11. Display a.
  12. Add 25 To 25 giving b.
  13. Multiply 25 By 25 giving c.
  14. Display "Add 25 Plus 25 Equals: ",b.
  15. display "Multiply 25 By 25 Equals: ",c.
  16. ACCEPT n
  17. PERFORM UNTIL n = 42
  18. DISPLAY n
  19. ACCEPT n
  20. END-PERFORM.
  21. STOP RUN.
  22.  
Success #stdin #stdout 0.01s 5276KB
stdin
10
43
5
42
1
stdout
The Cobol Add And Multiply Program.           
Add 25 Plus 25 Equals:  50
Multiply 25 By 25 Equals:  625
10
43
 5