Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4152


How many sections are there in data division in COBOL?

1112


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1305


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1151


What are the different open modes available in cobol?

1174


how do you reference the ksds vsam file formats from cobol programs

1159


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

1127


Name the sections present in data division.

1220


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

6775


Explain the configuration section of a cobol program with examples of syntax.

1167


Which Search verb is equivalent to PERFORM…VARYING?

1023


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1278


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2417


What is comp-1 and comp-2?

1215


Write the code to count the sum of n natural numbers.

1194