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

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 do u handle errors in BMS macro?

1939


How do you get the data to code the BMS macro?

1952


Explain how you can characterize tables in cobol?

1046


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

1194


State the various causes of s0c1, s0c5 and s0c7.

1060


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

1160


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9070


how to access the file from prodution from changeman tool and to submit a file to production

7517


example for sub strings ? and refernce modifications whit output pls

2298


how do you define single dimensional array and multidimensional array in your cobol?

1078


What is the difference between PIC 9.99 and 9v99 in COBOL?

1310


how do you reference the variable block file formats from cobol programs

1227


Which division and paragraphs are mandatory for a COBOL program?

1252


How many sections are there in data division in COBOL?

1113


IF I mention stop run in CICS what happens?

2352