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 the code for this program in cobol.
2 + 1 = 3
4+3=7
6+5=11
8+7=15
10+9=19

Answers were Sorted based on User's Feedback



i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19 ..

Answer / aj

do a loop on below equation . Varying n from 1 to required
value
(2n) + (2n-1)

Is This Answer Correct ?    11 Yes 2 No

i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19 ..

Answer / xxx

PERFORM VARYING X FROM 1 BY 1 UNTIL WS-ANS = 19
COMPUTE WS-ANS = (2 * X) + ((2 * X) - 1)
DISPLAY WS-ANS
END-PERFORM

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

give the examples for strings and unstrings in cobol

2 Answers   IBM,


How we copy a program from production region to development region.What is the process & syntax ?

3 Answers   CTS,


What are the different rules for performing sort operation?

0 Answers  


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

0 Answers  


How does IDMS communicate with CICS?

1 Answers   Covansys, Satyam,


How to Write the RESTART Logic Using COBOL?

4 Answers   GalaxE, L&T, Syntel, TCS,


i want all ERRORS codes in COBOL ,JCL,VSAM ,DB2,CICS

4 Answers   Infosys,


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,


what is scope terminator

2 Answers   IBM,


there is a file whose ORGANISATION is INDEXED.you want to read the records from the file in RANDOM fashion as well as sequentially.then which of the access mode would you specify? a.SEQUENTIAL b.RANDOM c.DYNAMIC D.ACCESS MODE has nothing to do with it

3 Answers   TCS,


Give some advantages of REDEFINES clause?

2 Answers   Syntel,


Categories