C language algorithm word version