Texas Instruments Interview Question

Write code for a running sum.