Create pat_1040.cpp