This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with programing

 
rick dog
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to put spaces in a string where 123456 would become 1 2 3 4 5 6
 
Matt Cartwright
Ranch Hand
Posts: 152
Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, depends on how those numbers are provided....

I basically can think of two ways doing it:






hope that helps
Matt
 
Henry Wong
author
Marshal
Pie
Posts: 20892
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am assuming that this is a homework problem, so... what have you done so far? and what issues have you run into?

Henry
 
Matt Cartwright
Ranch Hand
Posts: 152
Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Rick, you said String. I didn't read carefully enough.
What about a loop and charAt() ?

I sure do have a solution for that.

So, is it homework?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rick dog wrote:

Please check your private messages for an important administrative matter
 
Campbell Ritchie
Sheriff
Posts: 48396
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should always use a thread subject which tells us what your question is.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic