this is my first home work for c++