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 PERFORM - VARYING:
We have to write a program to elaborate PERFORM ...VARYING
Identification division.
Program- id. PerfVary.
Environment division.
Data division.
Working-storage section.
01 n pic 9(2) value 0.
01 i pic 9(2) value 1.
01 sum pic 9(4) value 0.
Procedure division.
Para-1.
Display(1 1) erase.
Display(5 5) "Enter a Number ".
Accept n.
Perform calc-para varying i from 1 by 1 until i > n.
Display(10 5) " Sum = " sum.
Stop run.
Calc-para.
Compute sum = sum + i.
Example of Accept statement: For illustration, ACCEPT FLAG-A can be specified to read the value of the FLAG_A from the console. It may be keep in mind that no file definition
Illustration of Multiply verb: (a) MULTIPLY A BY B. In this situation the value of A & B will be multiplied and the product will be stored in B. The decimal point locatio
BLANK WHEN ZERO: BLANK WHEN ZERO is an editing clause that may be used along with a picture. This will set the whole data item to blanks of its value is equal to zero. Though,
COBOL Words: The COBOL word can be formed by using the characters as shown below: 0-9 A-Z (a-z) - (hyphen) The rules below should be hold in forming the COBOL words.
PROGRAM FOR ADD CORRESPONDING: We have to write a simple program to demonstrate Add Corresponding. identification division. program- id. environment division.
Comparison of Nonnumeric Operands: A nonnumeric operand can be compared to the other nonnumeric operand according to the rules as shown below: (i) Fields of Equal Sizes:
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.
NEGATED SIMPLE CONDITION: Any of the easy condition explained can be preceded by the logical operator NOT. The consequence of placing the operator NOT before an easy condition
Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing. Z * $ - + CR DB . , B O /
Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd