about | help | code help+videos | done | prefs |
Write a method called reverse which gets an int value in string type and reverses the digits and returns a new string value. So if the given string is "2341", reverse method returns "1432". Also overload the method to a method that gets an int type value and reverses the digits of the int value and returns a new int, e.g. reverse(123) -> 321 (so, you should write two methods) reverse("") → "" reverse(0) → 0 reverse("CSE174") → "471ESC" ...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: 140
Copyright Nick Parlante 2017 - privacy