i need a program by giving input as a abcd in any randem order
but i need a output as 1234 related to abcd. i.e,. a for
1,b=2,c.....etc..

Answer Posted / parvatraj m bhuti

first we have to initialize the letters a=1,b=2,....
like that z=26..

then we have to read the variable v pic x(4)( which may be
abcd or any other) from input

Then we have to un string the variable v into 4 other
variables as a1,a2,a3,a4.

then
compute x1= (a1*10)+a2;
compute x2= (x1*10)+a3;
compute x3= (x2*10)=a4;

Then display ('answer is = ", x3);
That will be the answer.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1643


Describe the cobol database components?

672


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1583


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

651


State the various causes of s0c1, s0c5 and s0c7.

656






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

697


what are decleratives in cobol?

1825


What is the difference between binary search and sequential search?

634


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1017


how do you reference the rrds file formats from cobol programs

789


In which area will you utilize 88 level items in cobol?

709


What is the difference between goback, stop run and exit program in cobol?

915


What is Pic 9v99 Indicates in COBOL?

716


What is amode(24)?

679


What are the different types of condition in cobol and write their forms.

652