C++ and C Exercises part 1