What is the proper mathematical notation for a loop structure such as the following?
FOR i=1 to 10 BEGIN
{Perform loop task}
END;
I am a programmer, but prefer to work on paper and so I am slowly teaching myself notation as a shorthand way to do this.
Thanks.
Best Answer
For addition or multiplication (and therefore also subtraction and division), there exists two symbols; both $\sum$ and $\prod$, respectively.
For example, if you want to add the numbers from 1 to 100, you would put the following -
Or, if you wanted to multiply the square of numbers from 3 to 70, you would put the following -
Hopefully these examples clarify one possibility for loop notation (there may be others I am not aware of).