translating equation of center math formula to programming language problem

Top