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 |
period is missing in the cobol program which error we getting
How many sections are there in data division?.
What are various search techniques in cobol? Explain.
What is different between variable length and fixed length?
There is a variable with value 19446. Requirement is to convert it to 194.46. I tried it by doing divide by 100 and my receiving field data type is 9(03)v99. But the output is 194. I am not getting the decimal value. Could anyone pls let me know how to get this done?
What type of Call you would use if you don;t want the control back to the calling program?
The below is the declaration for a variable ws 01 ws pic 9(3). if you want to insert space how will you do that. in which level u should do it
What is the difference between next sentence and continue in cobol programing language?
In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?
subscript and index r not coded in u r application program what will happen?
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
How do we get current date from system with century in COBOL?