Divide Number

static void DivideNumber(int n)
{
    if (n >= 10)
    {
        DivideNumber(n / 10);
    }
    Console.WriteLine(n / 10);
}

If we call above code with input 274 then output would be: 0,2,27

Last updated