******************************************************************
* AREA DE COMENTARIO - REMARKS
* Author: RENILSON BINHO
* Date: 30/12/2020
* OBJETIVO: RECEBER 2 VENDAS E RETORNAR A MEDIA
*
******************************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. PROGVENDA.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DECIMAL-POINT IS COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WRK-VENDA1 PIC 9(5) VALUE ZEROS.
77 WRK-VENDA2 PIC 9(5) VALUE ZEROS.
77 WRK-MEDIA PIC $ZZZ.ZZ9,99.
PROCEDURE DIVISION.
ACCEPT WRK-VENDA1.
ACCEPT WRK-VENDA2.
COMPUTE WRK-MEDIA = (WRK-VENDA1 + WRK-VENDA2) / 2.
DISPLAY 'MEDIA DAS VENDAS: ' WRK-MEDIA.
STOP RUN.
END PROGRAM PROGVENDA.