Skip to main content
gamedev.net
🔒 Locked

java program

Started by jemarcode Jul 16, 2008 at 10:16 AM 2 replies 450+ views
Original Post
jemarcode
jemarcode
can you help me guys,,i neeed a java program..i need to input 4 digits and it will arrage to ones,tens,hundreds,thousands,sample i input 3245 and the output looks like this 3 2 4 5
DaedalusOwnsYou
DaedalusOwnsYou
Homework, much?

Look at the javadocs for Integer (google "java class Integer") and pay attention to the parseInt method.
dmatter
dmatter
For future reference, we aren't allowed to give you homework answers, only hints if you're stuck - jemarcode has done just this.

If you have a legitimate question that might be construed as a homework assignment then by all means explain to us in your first post (or when someone asks) why it isn't. [smile]
Simian Man
Simian Man
Hint: Use the modulus operator (which is the % sign in Java).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.