fork download
  1. IDENTIFICATION DIVISION. (FÁCIL)
  2. PROGRAM-ID. ARITMETICA.
  3. DATA DIVISION.
  4. WORKING-STORAGE SECTION.
  5.  
  6. 01 VARIAVEL.
  7. 05 A PIC 9(01) VALUE 5.
  8. 05 B PIC 9(01) VALUE 3.
  9. 05 A-B PIC 9(01) VALUE 1.
  10. * 05 A+B PIC 9(01) VALUE 4.
  11. 05 RESULTADO PIC 9(01) VALUE 0.
  12.  
  13. PROCEDURE DIVISION.
  14.  
  15. COMPUTE RESULTADO = A
  16. DISPLAY 'A = ' RESULTADO
  17.  
  18. COMPUTE RESULTADO = B
  19. DISPLAY 'B = ' RESULTADO
  20.  
  21. COMPUTE RESULTADO = A-B
  22. DISPLAY 'A-B = ' RESULTADO
  23.  
  24. COMPUTE RESULTADO = A – B
  25. DISPLAY 'A - B = ' RESULTADO
  26.  
  27. * COMPUTE RESULTADO = A+B
  28. * DISPLAY 'A+B = ' RESULTADO
  29.  
  30. COMPUTE RESULTADO = A + B
  31. DISPLAY 'A + B = ' RESULTADO
  32.  
  33. GOBACK.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cob:1: Warning: Invalid indicator 'N' at column 7
prog.cob:4: Warning: Invalid indicator '0' at column 7
prog.cob:11: Warning: Invalid indicator 'R' at column 7
prog.cob:31: Warning: File not terminated by a newline
prog.cob:31: Warning: Invalid indicator 'O' at column 7
prog.cob:1: Error: syntax error, unexpected WORD, expecting PROGRAM_ID
stdout
Standard output is empty