fork download
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. IDEONE.
  3. ENVIRONMENT DIVISION.
  4. DATA DIVISION.
  5. WORKING-STORAGE SECTION.
  6. 77 a Pic zz9.
  7. 77 b Pic zz9.
  8. 77 c Pic zz9.
  9. 77 d Pic zzz9.
  10. 77 e Pic zz9.
  11. 77 f Pic zz9.
  12. 77 n PIC Z9 .
  13. PROCEDURE DIVISION.
  14. Display "The Cobol Subtract/Divide Program.".
  15. Subtract 50 From 100 giving c.Divide 1225 By 35 giving f.
  16. Display "100 minus 50 Equals ",c.
  17. Display "1225 Divided By 35 Equals ",f.
  18. ACCEPT n
  19. PERFORM UNTIL n = 42
  20. DISPLAY n
  21. ACCEPT n
  22. END-PERFORM.
  23. STOP RUN.
  24.  
Success #stdin #stdout 0.01s 5280KB
stdin
10
43
5
42
1
stdout
The Cobol Subtract/Divide Program.
100 minus 50 Equals  50
1225 Divided By 35 Equals  35
10
43
 5