PROGRAM FOR MULTIPLY VERB:
We have to write a simple program to elaborate MULTIPLY verb. You can also use the edit characters in the program.
Program- id. Mulverb.
77 a pic s9(3)v9(2) value 0.
77 b pic s9(3)v9(2) value 0.
77 c pic s9(4)v9(2) value 0.
77 e-c pic -z(4).z(2).
Display(1 1) erase.
Display(3 5) "Enter first number :".
Display(5 5) "Enter second number :".
Multiply a by b giving c.
Move c to e-c.
Display(15 5) "Product = " e-c.
Description: This program gets 2 inputs from the user.
It multiplies them by using the MULTIPLY verb.
a*b is found and stored in c.
The unedited result is accessible in c.
We move c to e-c, where the edit characters are accessible.
Keep in mind that the variable e-c makes use of the - edit character.
The e-c will always be exhibited with result.