Update ipercent.cpp

Added percent() function