fork download
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. IDEONE.
  3.  
  4. ENVIRONMENT DIVISION.
  5.  
  6. DATA DIVISION.
  7. WORKING-STORAGE SECTION.
  8. 77 n PIC Z9 .
  9.  
  10. PROCEDURE DIVISION.
  11. ACCEPT n
  12. PERFORM UNTIL n = 42
  13. DISPLAY n
  14. ACCEPT n
  15. END-PERFORM.
  16. STOP RUN.
  17.  
Success #stdin #stdout 0.01s 5280KB
stdin
10
43
5
42
1
stdout
10
43
 5