input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16....
output:- A = 100,B=36,C=50.
Here spaces are considered between numbers.
When we give input as above, the numbers should be added n
displayed.So please help me out.
Answer Posted / dineshj
coding for that Here.
W-S SEC.
01 A.
05 FILLER PIC X(80) VALUES SPACES.
05 NUM1 PIC 9(3).
05 FILLER PIC X(80) VALUE SPACES.
05 NUM2 PIC 9(3).
05 FILLER PIC X(80) VALUE SPACES.
05 NUM3 PIC 9(3).
05 FILLER PIC X(80) VALUE SPACES.
05 NUM4 PIC 9(3).
05 FILLER PIC X(80) VALUE SPACES.
01 NUM5 PIC 9(4).
PRO-DIV.
ACCEPT NUM1.
ACCEPT NUM2.
ACCEPT NUM3.
ACCEPT NUM4.
COMPUTE NUM5 = NUM1 + NUM2 + NUM3 + NUM4 .
DISPLAY A.
This is the coding for your answer plese check it out
If it is wrong. Pls do let me know...
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
What is the Purpose of POINTER Phrase in STRING command in COBOL?
) what is the difference between AID and HANDLE AID?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is difference between static and dynamic call in cobol?
IF I mention stop run in CICS what happens?
how to access the file from prodution from changeman tool and to submit a file to production
What rules are to be followed while using the corresponding options?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Write the code implementing the perform … varying.
Have you used comp and comp-3 in your project? And how?
What is the difference between goback, stop run and exit program in cobol?
Differentiate between structured cobol programming and object-oriented cobol programming.
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
Name some of the examples of COBOl 11?
How do you reference the following file formats from cobol programs?