Question: Consider the following arithmetic statements. 1 . ADD AMT 1 TO FIN - OUT 2 . ADD AMT 1 TO AMT 2 GIVING AMT 3

Consider the following arithmetic statements.
1. ADD AMT1 TO FIN-OUT
2. ADD AMT1 TO AMT2 GIVING AMT3
3. COMPUTE AVERAGE = AMT1+ AMT2/2
4. COMPUTE AMT4= AMT1+ AMT2 ROUNDED
5. MULTIPLY AMT1 BY AMT2
6. DIVIDE AMT1 BY 2
7. MULTIPLY AMT4 TO TIMES AMT3
1. Which statements will produce syntax errors? Correct these.
2. On line 3, will correct average of AMT1 and AMT2 be computed? If your answer is no, make whatever changes you think are necessary to obtain the correct result.
3. For line 5, suppose the PIC clause of the AMT1 is 99V99. AMT2 has a PIC clause of 9(4)V99. Under what conditions will a logic error result? What can you do to prevent such an error?
4. Assume that all the syntax and logic errors have been corrected on lines 1 through 7 and that preceding steps are executed in sequence. What will be the results in the following fields: ANT1: AMT2: AMT3: AMT4: AVERAGE?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!