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 -ELSE:
We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE.
Identification division.
Program- id. IfElse.
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"
else
Display(10 5) " ODD NUMBER".
Stop run.
REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec
Example of condition names: The illustration below is of the use of the condition names 77 MARITAL-STATUS PIC 9 88 SINGLE VALUE IS ZERO 88 MA
Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data
DISPLAY STATEMENT: The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co
There are some restrictions when these procedures are used. (i) The Procedure should not contain any SORT/MERGE statement. (ii) An explicit transfer of the control outside
Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an
CLOSE STATEMENT: When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is
Structure of a COBOL Program: Every COBOL program should have the 4 divisions in the order in which they are specified below: 1. Identification division 2. Environment D
ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON
Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM
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