IDENTIFICATION DIVISION.
PROGRAM-ID. PROG001.
AUTHOR FERNANDO CARRARO.
INSTALLATION. CODEMONKEYJUNIOR.
DATE-WRITTEN. 01/04/19.
DATE-COMPILED.
SECURITY. NO ES CONFIDENCIAL.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 NUMERO1 PIC 9(9).
01 NUMERO2 PIC 9(9).
PROCEDURE DIVISION.
A000-FIRST-PARA.
MOVE 30 TO NUMERO1.
MOVE 33 TO NUMERO2.
IF NUMERO1 > NUMERO2 THEN
DISPLAY NUMERO1' ES MAYOR QUE 'NUMERO2
ELSE
DISPLAY NUMERO1' ES MENOR QUE 'NUMERO2
END-IF.
STOP RUN.
Uso de IF en Cobol.
Compilar:
cobc -c -free *.cbl -o programa.exe
Ejecutar:
./programa.exe
Compilar:
cobc -c -free *.cbl -o programa.exe
Ejecutar:
./programa.exe
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.