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
Explain how to differentiate call by context by comparing it to other calls?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Name the sections present in data division.
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
Name some of the examples of COBOl 11?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Differentiate between structured cobol programming and object-oriented cobol programming.
A table has two indexes defined. Which one will be used by the SEARCH?
What guidelines should be followed to write a structured cobol prgm?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
Define cobol?
What the difference is between continue and next sentence?
Write down the divisions of cobol program?
What is cobol?