01 April 2017

evenDigitsOnly

My solution:
bool evenDigitsOnly(int n)
{
    return n.ToString().All(c => int.Parse(c.ToString()) % 2 == 0);
}

Previous Next