uploaded prog1.cpp