illustration of divide verba divide 5 into aif


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 lost.

(b) DIVIDE 5 INTO A GIVING B.

If the value of A is 20, then after execution of this statement then the value of B will be 4. At this point the A will retain its older value.

(c) DIVIDE 3 INTO A GIVING B C.

In this illustration the result of the division of A by 3 will be stored both in B & C.

(d) DIVIDE 2.5 INTO A B GIVING C D.

In this situation the A will be divided by 2.5 and the result will be stored in C, while the result of the division of B by the 2.5 will be stored in D.

As in the situation of the MULTIPLY statement, the literals cannot be used for identifier-2, identifier-3, etc. Whenever the GIVING option is only used the numeric literals permitted in the place of identifier-2, identifier-3, etc. For illustration, DIVIDE A INTO 25 GIVING V. 

 

Request for Solution File

Ask an Expert for Answer!!
COBOL Programming: illustration of divide verba divide 5 into aif
Reference No:- TGS0174247

Expected delivery within 24 Hours