Simple C# recursive solution. Running time 94 ms.

```
public int AddDigits(int num) {
if (num == 0)
{
return 0;
}
int sum = 0;
while (num > 0)
{
int digit = num % 10;
sum += digit;
num = num / 10;
}
if (sum > 9)
{
return AddDigits(sum);
}
else
{
return sum;
}
}
```