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 ...UNTIL
We have to write a program to find the sum of "n" natural numbers.
Identification division.
Program- id. PerfUntil.
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 until i > n.
Display(10 5) " Sum = " sum.
Stop run.
Calc-para.
Compute sum = sum + i.
Add 1 to i.
/ (Slash Insertion): The edit character slash (/) also termed as virgule or stroke, may appear anyplace in the picture. When used, it will be inserted. More than one slash can
VALUE CLAUSE: The value clause defines the preliminary value of the data item. Normally initialization will be completed just before the first statement in the procedure di
Illustration of nested if statement: Consider the nested sentence which is as shown below: The IF-ELSE pairs in this sentence can be detected by applying the rule whic
Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing. Z * $ - + CR DB . , B O /
Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu
RULES FOR OCCURS CLAUSE: The rules apply for the OCCURS clause and the subscripts are as shown below. (1) The integer in the OCCURS clause should be a positive integer.
Illustration of Divide verb: (a) DIVIDE 5 INTO A. If the value of A is 20, then after execution of this statement the value of A will be 4. The older value of A will be los
CLASS CONDITION: The class condition establishes whether or not the value of the operand is numeric or alphabetic. The operand is numeric if it contains only the digits 0 t
program
PERFORM STATEMENT: The PERFORM statement can be used to execute the group of consecutive statements written elsewhere in the program. We refer to this group of statements a
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