i need the code for this program in cobol.
2 + 1 = 3
4+3=7
6+5=11
8+7=15
10+9=19
Answer Posted / 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 |
Post New Answer View All Answers
What is inspect in cobol ?
Write a program to explain size error.
What is the problem of ordered sequential files access?
Write down the divisions of cobol program?
how do you reference the fixed unblock file formats from cobol programs
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
how to move the records from file to array table. give with code example
Mention the guidelines to write a structured cobol program?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is the difference between Global and External Variables?
In COBOL, what is the different between index and subscript?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
How do you define a variable of comp-1 and comp-2?
What is the difference between Call and a Link?
How do you reference the following file formats from cobol programs?