So I was giving a problem to "calculate" the number of flops in class today..
Now, I read the examples in the text book, and they are hard enough to understand...I am hoping that some one here can push me onto the right track
find the flop count for the following sequence of commands:
What will be the value of a after the commands are executed ?
The Attempt at a Solution
I am not looking for a number, but a summation formula interms of n.
I am given that it has to be in the form
sum(i,n) i = n(1-n)/2
sum(i,n) i^2 = n(1-n)(2n-a)/6
So far, all I can see is that their must be n + n + n = 3n flops...
I have no idea how to calculate a.
Can somebody help me please?