Arithmetic Operators in COBOL
In COBOL, Arithmetic operations are performed in PROCEDURE DIVISION. COBOL provides us with a set of arithmetic operators to help us in our calculations. Arithmetic operations are performed using these major verbs –
1. ADD: This verb can be used to find the sum of two or more numbers and to store the sum.
2. SUBTRACT: This verb is used to subtract one, or the sum of two or more numbers from one or more numbers and to store the result.
3. MULTIPLY: This statement causes one or more multiplicands to be multiplied by a multiplier and to store the products.
4. DIVIDE: The purpose of this verb is to divide one number by another and to store the result.
5. COMPUTE: COMPUTE verb is so powerful. All the computations performed by the other four verbs
can also be done easily by using the COMPUTE verb.