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
Can a Search can be done on a table with or without Index?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Differentiate between structured cobol programming and object-oriented cobol programming.
Explain about different table spaces.
What are literals?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
Name some of the examples of COBOl 11?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
how do you reference the rrds file formats from cobol programs
What is cobol?
what is search and searchall?what is the diffrence between them?give an best example?
What the difference is between continue and next sentence?
Are you comfortable in cobol or jcl?
Explain how to differentiate call by context by comparing it to other calls?
Why would you use find and get rather than to obtain?