I have a number as N=2345
If I sum them the result will be 2+3+4+5 =14;
If I further sum them it will be 1+4 = 5; which is a single digit;
How to do this without recursive function?
int N = 2345;
while (N >= 10)
N = N.ToString()
.Sum(x => int.Parse(x.ToString()));