Different Types of Arithmetic Verbs in COBOL
This verb can be used to find the sum of two or more numbers and to store the sum. The ADD verb takes any one of the following two forms.
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.
This statement causes one or more multiplicands to be multiplied by a multiplier and to store the products.
The purpose of this verb is to divide one number by another and to store the result. There are several forms of this verb.
COMPUTE verb is so powerful. All the computations performed by the other four verbs can also be done easily by using the COMPUTE verb. Its general format is COMPUTE identifier-1 ROUNDED , identifier-2 ROUNDED … = arithmetic-expression; ON SIZE ERROR imperative-statement)