Professional Documents
Culture Documents
Final2020 2
Final2020 2
∑( 𝑋𝑖 )4 − 8
𝑖=1
University of Mosul Final Exam.
College: Petroleum & Mining Engineering Time: 3 Hrs.
Dept.: Mining Engineering Date: / / 2020
Class: 1st Year Lecturer: Dr. Sama Talee
Subject: prog1 Code:
S = 1;
for i = 2 : 3
S=S*i;
for j = 2: 3
X= i+j;
end
Q4 8 end
A) Determine the values of ( i , j , S , X ) during run time, explane your
answer as table.
B) Choose the correct answer :
1) S = S * i ; will be executed : 5 times , 2 times , 6 times
2) X = i + j ; will be executed : 2 times , 5 times , 4 times
Best Wishes