fork download
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. IDEONE.
  3. ENVIRONMENT DIVISION.
  4. DATA DIVISION.
  5. WORKING-STORAGE SECTION.
  6. 01 a Pic x(45) value "The Cobol Subtract/Divide Prog.".
  7. 77 b Pic zzz9.
  8. 77 c Pic zzz9.
  9. 77 n PIC Z9 .
  10. PROCEDURE DIVISION.
  11. Subtract 25 From 100 giving b.
  12. Divide 2025 by 45 giving c.
  13. Display "100 Minus 25 Equals: ",b.
  14. Display "Divide 45 Into 2025 Equlads: ",c.
  15. ACCEPT n
  16. PERFORM UNTIL n = 42
  17. DISPLAY n
  18. ACCEPT n
  19. END-PERFORM.
  20. STOP RUN.
  21.  
Success #stdin #stdout 0s 5284KB
stdin
10
43
5
42
1
stdout
100 Minus 25 Equals:   75
Divide 45 Into 2025 Equlads:   45
10
43
 5