Add Dynamic Programming in C