stringevenOrOdd(stringdigitsOnly){varevens=digitsOnly.Count(c=>Char.GetNumericValue(c)%2==0);varodds=digitsOnly.Length-evens;returnevens>odds?"Even is greater than Odd":evens<odds?"Odd is greater than Even":"Even and Odd are the same";}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
c#, using linq, input validations omitted: