about | help | code help+videos | done | prefs |
Without using any string or array methods, write a method that returns the product of the first and last digits of the positive integer parameter. For example, if the parameter is 5218, return 40 since 5*8=40. If the parameter is a single-digit number, that digit will be considered BOTH the first AND last digit. For example, with the parameter 7, you would return 49 since 7*7=49 and 7 would be considered both the first and last digit. ddd2FirstLastDigitProduct(5218) → 40 ddd2FirstLastDigitProduct(24141) → 2 ddd2FirstLastDigitProduct(42419) → 36 ...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: 240
Copyright Nick Parlante 2017 - privacy