Error found with c homework, changed S_X value from Y to X