about | help | code help+videos | done | prefs |
Given two doubles, they are locked when both numbers have the same number of digits, and corresponding digits are either both even or both odd. e.g. num1 = 12.31, num2 = 30.33. 1 and 3 are both odd. 2 and 0 are both even. 3 and 3 are both odd, and 1 and 2 are both odd. areLocked(6.0, 2.0) → true areLocked(61.1, 27.9) → true areLocked(66.0, 7.0) → false ...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: 199
Copyright Nick Parlante 2017 - privacy