Skip to content

Latest commit

 

History

History
23 lines (11 loc) · 1.48 KB

File metadata and controls

23 lines (11 loc) · 1.48 KB

Even or Odd - Which is Greater?

Provider Source Solutions
Codewars 57f7b8271e3d9283300000b4 JavaScript

Given a string of digits confirm whether the sum of all the individual even digits are greater than the sum of all the indiviudal odd digits. Always a string of numbers will be given.

  • If the sum of even numbers is greater than the odd numbers return: "Even is greater than Odd"

  • If the sum of odd numbers is greater than the sum of even numbers return: "Odd is greater than Even"

  • If the total of both even and odd numbers are identical return: "Even and Odd are the same"