* Function to find the sum of the digits of an integer. * @param num The integer. * @return Sum of the digits of the integer. * * \detail * First the algorithm check whether the num is negative or positive, * if it is negative, then we neglect the negative sign. * Next, the algorithm extract the last digit of num by dividing by 10 * and extracting the remainder and this is added to the sum