using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ADDINTTILLONEDIGIT
{
class Program
{
static void Main(string[] args)
{
start:
Console.WriteLine("Enter the integers to
make it to single int");
string input = Console.ReadLine();
if (!input.All(char.IsDigit))
goto start;
else
{
while (input.Length > 1)
{
input = input.Sum(x => x
- '0').ToString();
}
Console.WriteLine("Single digit number
is {0} :-)",input);
Console.ReadKey();
}
}
}
}