How to optimize C code with else if conditions

welcome to shbcf.ru