given the following:
77 A PIC 9V9 VALUE 9.5
77 B PIC 9 VALUE 9.
77 C PIC V9 VALUE 0.8
77 D PIC 9
77 E PIC 9
77 F PIC 9V999
what are the contenta of D E nad F after the following
statements are
executed:
COMPUTE F ROUNDED=A+C/B
MULTIPLY A BY C GIVING E
ADD B C A GIVING D ROUNDED
a.F=9.589 E=8 D=1
b.F=9.589 E=8 D=9
c.F=9.589 E=7 D=9
d.F=9.589 E=7 D=1
Answer Posted / ram g [mind tree]
c is the correct answer ...
the result will be like this
f = 9589
e = 7
d = 9
bcoz num truncation will happen in left.
for eg: if you try to store 123 in 01 x pic 9.
the value of x should 3 not 1.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How do you reference the following file formats from cobol programs?
Write a program that uses move corresponding.
How do get the result of your program directly on your pc?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
how to convert the recors form vsam file to db2 table tru file aid
What are the access modes of START statement?
How do you differentiate between cobol and cobol-ii?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
Can you please let me know the centre name of INS certification in Kolkata.
What is the difference between comp and comp-3 usage?
Which division and paragraphs are mandatory for a COBOL program?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
explain sorting techniques in cobol program?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?