Update 6-4.cpp

another solution !