English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Following is a computer program to calculate the value of Y.

I. Y=XZ

II. X=X+1;

III. Z=Y-X+2

IV. Go To STEP 1

The computer stops executing the program as soon as Y becomes greater than or equal to 3600. Intially X=1 and Z=2 . Find the last value of Z when the computer stops executing the program.

1)1518
2)721
3)1026
4)2021

how to choose the correct answer

2007-05-28 14:26:05 · 2 answers · asked by sanko 1 in Science & Mathematics Mathematics

2 answers

721
I just did it manually
x = [1,2,3,4,5,6,7]
y = [2, 2, 4, 9, 28, 125, 726, 5047]
z = [2, 2, 3, 7, 25, 121, 721, --- ]

2007-05-28 14:35:57 · answer #1 · answered by Dr D 7 · 1 0

The answer is 2)721.

In the 7th iteration Z=721 X=7 and Y=5047.

2007-05-28 21:48:17 · answer #2 · answered by Jim D 2 · 0 0

fedest.com, questions and answers