Which one of the following is incorrect
-
Divide A into B
-
Divide A by B
-
Divide A into B Giving C
-
Divide A by B Giving C
In COBOL, 'DIVIDE A BY B' is incorrect because the standard syntax is 'DIVIDE A INTO B' (where B is the dividend) or 'DIVIDE A BY B GIVING C'. 'DIVIDE A BY B' without a 'GIVING' clause is invalid.
To answer this question, let's go through each option to understand why it is correct or incorrect:
Option A) Divide A into B - This option is correct because it implies that A is being divided into equal parts, with B representing the number of parts.
Option B) Divide A by B - This option is incorrect because it does not specify the result of the division. It is missing the information about what the division is giving or producing.
Option C) Divide A into B Giving C - This option is correct because it specifies that A is being divided into B equal parts and the result of the division is C.
Option D) Divide A by B Giving C - This option is correct because it specifies that A is being divided by B, and the result of the division is C.
The correct answer is B.