about | help | code help+videos | done | prefs |
Write a method that returns the "sum" of the three input parameters, but ONLY counts the number 10. Also, if the last number is 100 subtract 1 from the "sum" of the first two numbers (still ONLY counting 10s). For example, for 7, 10, 3 the "sum" would be 10 since there is only one 10 and the non-tens do not count. But 10, 10, 100 would be 19 since there are two 10s adding up to 20, but since the last number is 100 you subtract 1 from this sum to get 19. Look at the test data for additional examples. nov3_2017_APSLHL_count10s(10, 10, 10) → 30 nov3_2017_APSLHL_count10s(10, 70, 45) → 10 nov3_2017_APSLHL_count10s(18, 22, 50) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy