about | help | code help+videos | done | prefs |
yearsFromMyAge
Create a method called int yearsFromMyAge(int theirAge) that when given the user's age it will return how many years they are from my age. Use Math.abs I am 46 now yearsFromMyAge(2) → 44 yearsFromMyAge(80) → 34 yearsFromMyAge(46) → 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: 5
Copyright Nick Parlante 2017 - privacy