about | help | code help+videos | done | prefs |
Write a method that accepts an integer parameter and returns an integer that has the first digit from the original number in the tens-place and the last digit from the original number in the ones-place. So 421781 results in 41 since the first digit is 4 and the last digit is 1. In solving this problem you are NOT allowed to use strings or arrays. NOTE: The original number will be a positive number with at least two digits. shrinkNum123(124241) → 11 shrinkNum123(4289) → 49 shrinkNum123(4829) → 49 ...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