study the following
01 A PIC 99V0 VALUE 5
01 B PIC 9V9 VALUE 6
01 C PIC 99V9 VALUE 2.5
01 D PIC 99 VALUE 3
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR
the comments of A.B.C after execution of the above
statement are
a.A=10 B=0 C=10
b.A=10 B=9.9 C=9.9
c.A=10 B=0 C=9.9
d.A=10 B=6 C=10
Answer Posted / karthik
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
DATA division.
WORKING-STORAGE SECTION.
01 A PIC 99V9 VALUE 5.
01 B PIC 99V9 VALUE 6.
01 C PIC 99V9 VALUE 2.5.
01 D PIC 99 VALUE 3.
PROCEDURE DIVISION.
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR.
DISPLAY A.
DISPLAY B.
DISPLAY C.
STOP RUN.
PRINT-ERROR.
DISPLAY "ERROR".
o/p
10.0
10.0
10.0
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
how do you reference the variable unblock file formats from cobol programs
Explain the configuration section of a cobol program with examples of syntax.
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is length is cobol?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
What is a scope terminator give example?
Explain how to differentiate call by context by comparing it to other calls?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
how to move the records from file to array table. give with code example
Which division and paragraphs are mandatory for a COBOL program?
What is rmode(any) ?
Differentiate between structured cobol programming and object-oriented cobol programming.
What are all the divisions of a COBOL program?
Difference between cobol and cobol-ii?