Computer Science, asked by Pradyumna349, 8 months ago

Determine the frequency count of all statements in the following algorithm segment:
i:=1;
while(i<=n) do {
x:=x+1;
i:=i+1;} *

Answers

Answered by Anonymous
10

Answer:

(i.e. the number of time each statement gets read/executed) in the following C code.

The frequency count of each statement must be written in terms of 'n'.

for(i=1;i<=n;i++)

for(j=1;j<=i;j++)

for(k=1;k<=j;k++)

x=x+1;

Answered by kartikmandhan14
1

Answer:

3n+2

Explanation:

1+(n+1)+n+n

Similar questions