Some simple algorithms realized in C/C++