Sample REXX program to add two variables.

Sample REXX program to add two variables.

Lets see how to write a sample program which will do addition of two variables.
In this example input will be given by user dynamically and output (addition) will be displayed on concole.

/*REXX*/
SAY 'Input variable 1='
PULL a

SAY 'Input variable 2='
PULL b
c= a + b
SAY 'Addition is = ' c

PULL - Its like scanf in "C".

Console after program execution -
Input variable 1=
5

Input variable 2=
6
Addition is = 11