Question: Complete this : IDENTIFICATION DIVISION PROGRAM-ID. Work1 as Work1. AUTHOR. Yourname DATA-DIVISION. WORKING-STORAGE SECTION. 01 Num1 PIC 999 VALUE ZEROS. 01 Num2 PIC 999 VALUE

Complete this :

IDENTIFICATION DIVISION PROGRAM-ID. Work1 as "Work1". AUTHOR. Yourname DATA-DIVISION. WORKING-STORAGE SECTION. 01 Num1 PIC 999 VALUE ZEROS. 01 Num2 PIC 999 VALUE ZEROS 01 Result PIC 999999 VALUE ZEROS. 01 Operator PIC X VALUE SPACE.

PROCEDURE-DIVISION. Calculator. PERFORM 3 TIMES DISPLAY "Enter First Number (max 3-digits) : " WITH NO ADVANCING ACCEPT Num1 DISPLAY "Enter Second Number (max 3-digits) : " WITH NO ADVANCING ACCEPT Num2 DISPLAY "Enter operator (+ or *) : " WITH NO ADVANCING ACCEPT Operator IF Operator = "+" THEN ADD Num1, Num2 GIVING Result END-IF IF Operetor = "*" THEN MULTIPLY Num1 BY Num2 GIVING Result END-IF DISPLAY "Result is = ", Result END-PERFORM. STOP RUN. END-PROGRAM Exercise1.

b.) correct the syntax errors on each of the 3 division lines.

c.) Run the program with the following 3 sets of inputs:

First Number: 123

Second Number: 234

Operator: +

First Number: 505

Second Number: 330

Operator: *

First Number: 900

Second Number: 895

Operator: *

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 Databases Questions!