Question: algorithm problem

Hi, I have the following problem: Input: positive integer n, real number y (1) a:=1, b:=1 (2) for i =1 to n do (3) a:= (a*y)/i, (4) b:=b+a (5) end do (6) output: b I am struggling to find the number of assignments in terms of n. I understand for (2), I will need (n-1) assignments. For (3), will I need the sum of (i+1)? Not sure what to do with the rest of it... Any help would be appreciated. thanx. antonio
Please Wait...