Update main.cpp

Added modulo function...