i need the code for this program in cobol.
2 + 1 = 3
4+3=7
6+5=11
8+7=15
10+9=19
Answers were Sorted based on User's Feedback
Answer / aj
do a loop on below equation . Varying n from 1 to required
value
(2n) + (2n-1)
| Is This Answer Correct ? | 11 Yes | 2 No |
Answer / xxx
PERFORM VARYING X FROM 1 BY 1 UNTIL WS-ANS = 19
COMPUTE WS-ANS = (2 * X) + ((2 * X) - 1)
DISPLAY WS-ANS
END-PERFORM
| Is This Answer Correct ? | 1 Yes | 0 No |
How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.
For rewrite, why is it mandatory that file needs to be opened?
What are all the divisions of a COBOL program?
Explain about level numbers?
can you declare redefine in level 01?
The maximum number of dimensions that an array can have in COBOL-85 is ?
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above
can we write paragraph in area B .....
IF I mention stop run in CICS what happens?
Have you code any new programs in COBOL ? What is the functionality of the programs?
how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)
With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?