fork download
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. IDEONE.
  3. ENVIRONMENT DIVISION.
  4. DATA DIVISION.
  5. WORKING-STORAGE SECTION.
  6. 77 ws-a pic 9v99 value 3.14.
  7. 77 ws-c pic 99 value 12.
  8. 77 ws-d pic 99 value 12.
  9. 77 ws-vol pic 9999 value zeros.
  10. 77 n PIC Z9 .
  11. PROCEDURE DIVISION.
  12. Display "The Cobol Volume Of A Cylinder Program.".
  13. Display ws-a" "ws-c" "ws-d.
  14. Compute ws-vol = ws-c**2 * ws-d * ws-a.
  15. Display "The Volume Of A Cylinder ",ws-vol.
  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 5288KB
stdin
10
43
5
42
1
stdout
The Cobol Volume Of A Cylinder Program.
3.14 12 12
The Volume Of A Cylinder 5425
10
43
 5