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
Difference between array and sub-script ?
Name some of the examples of COBOl 11?
What kind of error is trapped by on size error option?
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...)
What are the access modes of START statement?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
How arrays can be defined in COBOL?
what is difference between cobol and cobol/400
What is the use of intialize verb?
Whats the difference between search & search ALL?
Have you used comp and comp-3 in your project? And how?
) How do u handle errors in BMS macro
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
Why occurs cannot be used in 01 level in COBOL?
Difference between cobol and cobol-ii?