C++ Program to Check if a given Number is Perfect Number or not