| Bellwo source code helps to get sum digit of a number given upto one level means let suppose there is number 124 then it is
1+2+4=7
int IntValue = 1234;
string intstr = Convert.ToString(IntValue); ///convert int to string
while (intstr.Length > 1)
{
int iSum = 0;
for (int i = 0; i < intstr.Length; i++)
iSum += Convert.ToInt32(intstr[i].ToString());
intstr = iSum.ToString();
}
int iOutput = Convert.ToInt32(intstr); | | |