Update main.cpp

added max function for our rectangle