public static void Main()
int numberSample = inputInteger;
int lowest = int.MaxValue, secondlowest = int.MaxValue;
while (numberSample != 0)
int digit = numberSample % 10;
numberSample = numberSample / 10;
if (digit < secondlowest && digit!=lowest)
if (secondlowest < lowest)
if (secondlowest == int.MaxValue)
Console.WriteLine("There is no second lowest number");
Console.WriteLine("Lowest digit in {0} is {1} and second lowest digit is {2}", inputInteger,lowest,secondlowest);