- 149

- 31

I wasn't sure if this belonged in the general math forum or not, so I posted it here instead (mods - feel free to move if it belongs elsewhere).

What I want to know is how to properly write out a computer algorithm in proper math notation. Take this code for example:

Code:

```
Height = 4
Width = 10
For X = 0 to Width - 1
For Y = 0 to Height - 1
index = x + (y * width)
Next
Next
```

index = x∑y∑ x + (y * x)

Is that even close?