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


Please Help Members By Posting Answers For Below Questions

Can a Search can be done on a table with or without Index?

800


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1901


Differentiate between structured cobol programming and object-oriented cobol programming.

663


Explain about different table spaces.

646


What are literals?

628






What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

673


Name some of the examples of COBOl 11?

2679


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...)

1924


how do you reference the rrds file formats from cobol programs

795


What is cobol?

743


what is search and searchall?what is the diffrence between them?give an best example?

5541


What the difference is between continue and next sentence?

654


Are you comfortable in cobol or jcl?

641


Explain how to differentiate call by context by comparing it to other calls?

684


Why would you use find and get rather than to obtain?

681