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

 

tmhscs@gmail.com competition > HPCW2020_02_Mirrored
prev  |  next  |  chance

MirroredNumber
Problem 02
Worth 2 points

You are working on special effects for a movie, and the director wants to see a scene where numbers on a
screen are reflected in a mirror. Your task is to program a function that will "mirror" a number.

Given an integer, such as 1234, reverse the number to 4321 so it is the mirror reflection of itself. Note: The
maximum length of an integer you would encounter is 30.

HPCW2020_02_Mirrored(1234) → 4321
HPCW2020_02_Mirrored(7946) → 6497
HPCW2020_02_Mirrored(998877665544332211) → 112233445566778899

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

public long HPCW2020_02_Mirrored(long number) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy