program for perform - varyingwe have to write a


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.

Request for Solution File

Ask an Expert for Answer!!
COBOL Programming: program for perform - varyingwe have to write a
Reference No:- TGS0174609

Expected delivery within 24 Hours