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 Subtract And Divide Progrsm.".
  7. 77 b Pic zz9.
  8. 77 c Pic zz9.
  9. 77 n PIC Z9 .
  10. PROCEDURE DIVISION.
  11. Display a.
  12. Subtract 25 From 50 giving b.
  13. Divide 625 by 25 giving c.
  14. Display "Subtract 25 From 50 Equals: ",b.
  15. Display "Divide 625 By 25 Equals: ",c.ACCEPT n
  16. PERFORM UNTIL n = 42
  17. DISPLAY n
  18. ACCEPT n
  19. END-PERFORM.
  20. STOP RUN.
  21.  
Success #stdin #stdout 0.01s 5280KB
stdin
10
43
5
42
1
stdout
The Cobol Subtract And Divide Progrsm.        
Subtract 25 From 50 Equals:  25
Divide 625 By 25 Equals:  25
10
43
 5