fork(1) download
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. IDEONE.
  3. AUTHOR.
  4. LEE BRADLEY.
  5. DATE-WRITTEN.
  6. 11-18-22.
  7.  
  8. ENVIRONMENT DIVISION.
  9.  
  10. DATA DIVISION.
  11. WORKING-STORAGE SECTION.
  12. 01 GRADE PIC 9(3).
  13. 01 GRADE-TEN PIC 9(2).
  14. 01 FILLER.
  15. 05 LETTERS PIC X(11) VALUE "FFFFFFDCBAA".
  16. 05 FILLER REDEFINES LETTERS.
  17. 10 GRADE-10 OCCURS 11 TIMES PIC X.
  18.  
  19. PROCEDURE DIVISION.
  20. DISPLAY "Enter a grade in 0..109 : ".
  21. ACCEPT GRADE.
  22. COMPUTE GRADE-TEN = GRADE / 10 + 1.
  23. DISPLAY GRADE-10 (GRADE-TEN).
  24. STOP RUN.
  25.  
Success #stdin #stdout 0.01s 5516KB
stdin
89
stdout
Enter a grade in 0..109 : 
B