Multiple choice technology mainframe

What will happen if I change the below code MOVE ZERO TO TOTAL . PERFORM VARYING I FROM 1 BY 1 UNTIL I > 100 COMPUTE TOTAL = TOTAL + ITEM(i) * DISCOUNT END-PERFORM to the follwing code MOVE ZERO TO TOTAL PERFORM VARYING I FROM 1 BY 1 UNTIL I > 100 COMPUTE TOTAL = TOTAL + ITEM(i) END-PERFORM COMPUTE TOTAL = TOTAL * DISCOUNT

  1. NO ERROR but offcourse the result will differ.

  2. syntax error will occur

  3. Run time error

  4. NO ERROR with same result

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Applying the distributive law of multiplication over addition, summing the items first and then multiplying the total by the discount yields the exact same mathematical result as multiplying each item individually.