adapting two.cpp to use pointer arithmetic
adapted to use the pointer arithmetic
added support for new three program