about | help | code help+videos | done | prefs |
Write a method that has an input parameter called 'num' which is a two-digit integer between 10 and 99 inclusive. The method returns the sum of the digits in 'num'. For example, funnyHatNums(53) returns 8 since 5+3=8. Look at the test data for further examples. Please note: NO STRING METHODS ARE ALLOWED in your solution! funnyHatNums(56) → 11 funnyHatNums(23) → 5 funnyHatNums(89) → 17 ...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: 220
Copyright Nick Parlante 2017 - privacy