Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Need Some Help
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-30-2011, 02:39 AM
Grand Master
 
Join Date: Nov 2005
Location: Perth Amboy, NJ...Sorry no lame joke
Posts: 2,455
Default Need Some Help

Hey guys. I'm trying to do a programming lab for school.



How do I separate a number like 3456 to 3 4 5 and 6? I looked everywhere, but I can't find the answer, it's probably very simple.
Reply With Quote
  #2  
Old 03-30-2011, 05:00 AM
The Black Tux's Avatar
Only Skype: TBT_Sythe | Always Request a PM!
The Black Tux Donor Java Programmers Sythe Verified User
 
Join Date: Apr 2009
Location: Colombia
Posts: 6,046
Send a message via Skype™ to The Black Tux
Sythe Donations Bond Holder
Default Re: Need Some Help

divide string into char array, create new string, for each char do space...
__________________
The Paypal Blacklist

1100+ Vouches - OMM Service

"It is hard to believe that a man is telling the truth when you know that you would lie if you were in his place."
OMM | MM of 2011 & 2012 | Most Helpful User of 2011 | Former OGV | Former CA | 2x Most Community-Involved MotM
Reply With Quote
  #3  
Old 03-30-2011, 05:02 PM
Grand Master
 
Join Date: Nov 2005
Location: Perth Amboy, NJ...Sorry no lame joke
Posts: 2,455
Default Re: Need Some Help

Which code would I use to create an array?

Last edited by wtp : 03-30-2011 at 07:34 PM.
Reply With Quote
  #4  
Old 03-31-2011, 12:14 AM
Member
BANNED
 
Join Date: Mar 2011
Posts: 89
Default Re: Need Some Help

Quote:
Originally Posted by wtp View Post
Which code would I use to create an array?
You can use the regex split() and Integer valueOf() along with the scanner.

scan for input (input example: 1 2 3 4)
String numbers[] = input.split(" ");
convert to int using valueOf
add ints together to get sum.

Have fun!
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 06:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1