We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,620 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Machine Problem

Hello!
so im here again and mi gonna ask some questions:

i did a prgram that will accept 10 numbers
i should print all of those inputted ten numbers but i have to eliminate the numbers that was repeated
e.g:

input : 1234556789
output: 123456789

thanks guys i already did the code for printing the numbers but the elimination, i havent done it yet,
i cant paste the code because im not home so please bear with me thanks!

2
Contributors
1
Reply
5 Hours
Discussion Span
10 Months Ago
Last Updated
2
Views
Ms New to Java
Junior Poster
177 posts since Jan 2012
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

so. what is your problem?

create a new string
iterate over the chars{
  if the new string contains the currentChar
    goToNextIteration
  add currentChar to the new String
}

it doesn't only seem easy. it pretty much is.

stultuske
Industrious Poster
4,489 posts since Jan 2007
Reputation Points: 1,377
Solved Threads: 627
Skill Endorsements: 25

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0568 seconds using 2.69MB