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 happens if parmparameter passes zero bytes to the program
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Explain about different table spaces.
how do you reference the variable unblock file formats from cobol programs
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
What is a scope terminator give example?
What is the difference between external and global variables in COBOL?
how to move the records from file to array table. give with code example
What the difference is between continue and next sentence?
Name the sections present in data division.
how can i see junk values in dclgen or in hostvariable of comp ?
What is the difference between comp and comp-3 usage?
How do u write test cases?
What is the problem of ordered sequential files access?
How to remove 2 duplicate records and copy only one using job control language?