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
Explain how you can characterize tables in cobol?
What the difference is between continue and next sentence?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
Write a program to enter and display the names of students in a class using the occurs clause.
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
How do you get the data to code the BMS macro?
Can we redefine the field of x(200) to less than 200?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
What are the various section in data division and briefly explain them.
What is a scope terminator give example?
How are the next sentence and continue different from each other?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Why did you choose to work with ibm mainframe cobol programming?
Explain about different table spaces.