       IDENTIFICATION DIVISION.
       PROGRAM-ID. ABC045-A.
       DATA DIVISION.
       FILE SECTION.
       WORKING-STORAGE SECTION.
       77 A PIC 9(3).
       77 B PIC 9(3).
       77 H PIC 9(3).
       77 ANS PIC 9(5).
       77 ANSS PIC Z(5).

       PROCEDURE DIVISION.
       MAIN-PROCEDURE.
               ACCEPT A FROM SYSIN.
               ACCEPT B FROM SYSIN.
               ACCEPT H FROM SYSIN.
               COMPUTE ANS = (A + B) * H / 2.
               MOVE ANS TO ANSS.
               DISPLAY ANSS.
               STOP RUN.
       END PROGRAM ABC045-A.
