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

 

zbaharav@kehillah.org zzsinglepage > flipDigits
prev  |  next  |  chance

Given an input integer between 1000 and 9999, with four digits which are not zero, return a new integer where the digits are in reverse order.


flipDigits(1234) → 4321
flipDigits(9234) → 4329
flipDigits(1555) → 5551

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

public int flipDigits(int n) { }

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: 210

Copyright Nick Parlante 2017 - privacy