Perceptron learning model, written in C