Skip to content

STGCodeChallengesOrg/Set-01-Challenge-03

Repository files navigation

Challenge03

Search for all the numbers in a string, add them together, then return that final number divided by the total amount of letters in the string. For example: if the string is "Hello6 9World 2, Nic8e D7ay!" the output should be 2. First if you add up all the numbers, 6 + 9 + 2 + 8 + 7 you get 32. Then there are 17 letters in the string. 32 / 17 = 1.882, and the final answer should be rounded to the nearest whole number, so the answer is 2. You may have multi digit numbers as well as negative numbers so be sure to handle those as well.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published