Shanu.sukoor
New User
Joined: 31 Jan 2006 Posts: 32 Location: India
|
|
|
|
The MAINPRG COBOL program is displayed below. For this program, if the variables X, Y, and Z are assigned the values "1", "5", and "50", which of the following are the possible outputs upon executing this program?
PERFORM VARYING X FROM 1 BY Y UNTIL X>Z
CALL CHECKPRG USING X,Y,Z
END-PERFORM.
DISPLAY X,Y,Z.
The PROCEDURE DIVISION of CHECKPRG is displayed below.
PROCEDURE DIVISION USING X1,Y1,Z1.
IF Z1>Y1 AND Y1>X1
DIVIDE Z1 BY X1 GIVING Y1
ELSE GOBACK.
A. 35, 15, 45
B. 5, 10, 50
C. 20, 15, 45
D. 5, 15, 45
E. 50, 15, 45 |
|