Algorithm project with C