Friday, 10 May 2013

calculations in COBOL...

WORKING-STORAGE SECTION.
01 A                        PIC 99V0 VALUE 5.
01 B                        PIC 9V9 VALUE 6.
01 C                        PIC 99V9 VALUE 2.8.
01 D                        PIC 99 VALUE 3.

PROCEDURE DIVISION.
COMPUTE A ROUNDED B C = A + B * C / D.
STOP RUN.


ANS:

A = 11, B = 0.6, C = 10.6.

No comments:

Post a Comment

Expense Handler Application with advance technologies

Budget Planner  One of the application developed with Ionic 4 and Python-Flask.  Ionic 4 code:  https://github.com/logeshbuiltin/Expense...