id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > quiz2022_03_23_SLHL_flipper
prev  |  next  |  chance

Write a method that returns a "flipped" version of 'num'. The "flipped" version of a number is the number with all its digits in reverse order. For example, the "flipped" version of 12345 is 54321. The flipped version of 16003 is 30061. To make your life easier, as preconditions, you may assume that both 'num' and the flipped version of 'num' are less than MaxInt. You may also assume that both numbers will start AND end in a non-zero digit. You are NOT allowed to use arrays or strings! Let me repeat that... NO ARRAYS OR STRINGS! You also may NOT use List or ArrayList.


quiz2022_03_23_SLHL_flipper(12443) → 34421
quiz2022_03_23_SLHL_flipper(8) → 8
quiz2022_03_23_SLHL_flipper(0) → 0

...Save, Compile, Run (ctrl-enter)

public int quiz2022_03_23_SLHL_flipper(int num) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 240

Copyright Nick Parlante 2017 - privacy