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
What are the cobol coding sheets?
how do you reference the rrds file formats from cobol programs
Describe the cobol database components?
what is difference between cobol and cobol/400
Which is not true about evaluate statement
Write the code implementing the perform … varying.
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
How arrays can be defined in COBOL?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Explain about different table spaces.
Why occurs cannot be used in 01 level in COBOL?
What is the utilization of copybook in cobol?
Explain what you understand by passing by value.
What are different data types in cobol?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?