For the below code,
int digsum(ll num) { //function to calculate sum of digits if (num < 0) num = abs(num); int ans = 0; while (num !=