Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is
Answer Posted / mr.perfect
ADD A B TO C. (Means (A+B)+C moved in C)
ADD 40 X TO X
Value of X is 10
So, ADD 40 10 TO 10 (Gives 40+10+10 = 60)
Now, COMPUTE X = 3 * X - 40
Here , order of preference is - then * will come
so, it will calculate first X-40 = 60-40 =20
THEN, 3*20 == 60
Means X = 3 * 60 - 40 ==20
So answer is : 60
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How can you get the ksds file records into your cobol program?
What do you understand by psb and acb?
what is the difference between COBOL2 AND COBOL390?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
i want a program using by if, evaluate , string, unstring, perform, occurs?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
what happens if parmparameter passes zero bytes to the program
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
) what is the difference between AID and HANDLE AID?
how can i see junk values in dclgen or in hostvariable of comp ?
) How do u handle errors in BMS macro
Explain how to differentiate call by context by comparing it to other calls?
how do you reference the variable unblock file formats from cobol programs
What guidelines should be followed to write a structured cobol prgm?