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
) How do u handle errors in BMS macro?
How do you get the data to code the BMS macro?
Explain how you can characterize tables in cobol?
Write the code to count the sum of n natural numbers.
State the various causes of s0c1, s0c5 and s0c7.
how do you reference the ksds vsam file formats from cobol programs
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
how to access the file from prodution from changeman tool and to submit a file to production
example for sub strings ? and refernce modifications whit output pls
how do you define single dimensional array and multidimensional array in your cobol?
What is the difference between PIC 9.99 and 9v99 in COBOL?
how do you reference the variable block file formats from cobol programs
Which division and paragraphs are mandatory for a COBOL program?
How many sections are there in data division in COBOL?
IF I mention stop run in CICS what happens?