Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
PROGRAM FOR IF :
We have to write a program to check whether the given number is ODD or EVEN.
Identification division.
Program- id. Ifst.
Environment division.
Data division.
Working-storage section.
01 n pic 9(3) value 0.
01 q pic 9(3) value 0.
01 r pic 9(3) value 0.
Procedure division.
Para-1.
Display(1 1) erase.
Display( 3 5) " Enter a Number :".
Accept n.
Divide n by 2 giving q remainder r.
If (r = 0)
Display(10 5) " EVEN NUMBER"
Go to end-para.
Display(10 5) " ODD NUMBER"
End-para.
Stop run.
Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi
Format for COBOL Programs: The COBOL is a high-level language. Therefore, a COBOL program can be executed on a computer for which a COBOL compiler exists. The compiler transla
NESTED IF STATEMENT: The then and else statement of an IF statement can hold other IF statements. The involved IF statements in their turn may also hold other IF statements
REWRITE STATEMENT: The REWRITE statement has the format for a relative file as shown below, REWRITE record-name [ FORM identifier ]
PERFORM WITH UNTIL OPTION: The format is as shown below: Illustration: A) Perform p-3 until i > 5. Here p-3 will be executed whenever i B) Perform p-2 thru
MULTIPLY VERB: The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be
WRITE STATEMENT: The records are written to be logical place as determined from the value of the record key. The INVALID KEY condition occurs in the cases shown below: (i)
READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the
COMPUTE VERB: The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format i
PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd