solve linear equation in "pure c"