Update main.cpp

Changed dynamArray to double as per assignment statement