Question: I just need help with question 2, its asking for how many times each statement will get executed. The code is in Pascal Coding Language.

I just need help with question 2, its asking for how many times each statement will get executed. The code is in Pascal Coding Language. Would greatly appreciate the help! Thanks in advance!
I just need help with question 2, its asking for how many
times each statement will get executed. The code is in Pascal Coding

2. Analyze the code and fill in the blanks vith the times that a statemant is axecuted in tern of n. (5pts, 1pt each blank) (1) FOR k=n DOWNTO 1 DO (1) BEGIN x=x+11 FORj:= DOWNTO i do (2). y=y+1 (s) ENDI Statement (1) will be executed will be executed times ; Statement (2) will be executed t ines i Statement (3 ) (5) tifines FOR t1=1 TO n DO FOR jt=1 TO i DO FOR k1=1 TO j DO x1=x+delta; (4) Stateent (5) vill be executed tians: (3) 4=11 WHILE it1=i2 (s) Stateant 5 witi be esecuted thess: 2. Analyze the code and fill in the blanks with the times that a statenent is executed in tern of n. (5pts, 1pt each blank) (1) FORE: n DOWNTO DO (1) BEGIN x:=x+23 FORj:=n DOWNTO i DO (2) y:=y+1 (3) ENDi Statement (1) will be executed times : Statement (2) will be executed times : Statement {3} will be executed times (2) FOR - h1=1 TO n DO FOR j=1 TO i DO FOR kk1=1 TO j DO x1=x+delta: Statement (5) will be executed tiees: (3) h1=11 WHILE i

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!