natf2 is shutting down, head over to teamfortress.tv for all of your TF2 coverage.

370 Posts
 
Ready to program Java »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

possiblylethal wrote:

I believe many people here are making the questions 10x harder than they need to be.

"Make sure the number (string) is a three digit number."

Note: That the number passed in is a string (this must be true because c.readLine() takes in a string). There is no need to turn this string into an integer yet.

Ask the string how long it is. No need to complicate things. note: strings start at 0!
Bonus: the user could enter in a 3 letter word instead of a number. How would you ask a string to see if any/all characters in the string are letters or numbers or !@#$%^&*()_+[]\ ect.

"Reverse the original number (string)"
There are many fun ways to do this. I think the most basic way would be to create a new string.

"Subtract the reverse from the original"
Probably easiest way is to now convert the string into an integer and save into an int (www.google.com) then subtract them.

"Reverse a second time the resulting number"
See above. Man, it would be nice if you didnt have to do this twice and could just pass it into a function that spits it out.

"Add it to un-reversed form and display"
Grab the un-reversed form, convert to integer, save into in, display into console however you do that with "Console"

add me if you need any more help

as someone who is in a highschool java class, the purpose of assignments like these are to teach you how to use ints/loops ect... Once you can do stuff like this they teach you the simpler and easier ways to do them

Fri, 05 Oct 2012, 08:02pm
Guildwars 2: look for people to play with... »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

frio the trash.4728
crystal desert
lv 80 guardian :D

Sat, 29 Sep 2012, 04:04am
flippers: looking for an esea open team or esea intermediate team, as roaming or pocket soldier »
15
frio  Steam
mid+
Registered: September 2011
Posts: 370

must have killed a lot of pyros for 2060

Sat, 01 Sep 2012, 03:54am
What is it about IM that makes teams die... »
14
frio  Steam
mid+
Registered: September 2011
Posts: 370

bros over pros when picking people up, or else your team will probably die

Fri, 31 Aug 2012, 06:52pm
s12 players to watch »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

boink best med s12

Wed, 29 Aug 2012, 11:00pm
128GB SSD Samsung for $90 »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

I saw this on slickdeals, 120gb kingston ssd for 80$
http://slickdeals.net/permadeal/76762/amazon.com-kingston-ssdnow-v-200-sata-iii-2.5-solid-state-drives-ssd-120gb-80-240gb-170

Mon, 09 Jul 2012, 04:20pm
Medic looking »
-1
frio  Steam
mid+
Registered: September 2011
Posts: 370

One of the best meds in IM

Tue, 26 Jun 2012, 08:15pm
looking for team »
-3
frio  Steam
mid+
Registered: September 2011
Posts: 370

The greatest

Tue, 26 Jun 2012, 01:07am
CSF looking for a good pocket »
2
frio  Steam
mid+
Registered: September 2011
Posts: 370

y not give ur roster

Tue, 26 Jun 2012, 01:07am
@Pure on soldiers, or @anyone who could explain. »
28
frio  Steam
mid+
Registered: September 2011
Posts: 370

Gunboats are way more important than the equalizer

Mon, 25 Jun 2012, 03:47am
Need help, Game won't launch. »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

System restore to a time when all was well

Mon, 25 Jun 2012, 03:30am
Selling Computer Stuff »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

I built this about a year ago and recently upgraded. PM me if you're interested/want pics.

Intel E5300 (not sure how well it overclocks)
Asus P5G41m-LE 775 mATX
4GB DDR2 Corsair XMS 800mhz 5-5-5-18 (2x2gb)
Galaxy GC GTS 450 1gb

Last edited: Sat, 23 Jun 2012, 03:43am by frio

Sat, 23 Jun 2012, 03:35am
how to properly review demos »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

are you spadez

Mon, 18 Jun 2012, 07:16pm
What is the world coming to? »
1
frio  Steam
mid+
Registered: September 2011
Posts: 370

laurent needs a frag vid

Tue, 12 Jun 2012, 06:22pm
LandSeR LFT as Scout »
0
frio  Steam
mid+
Registered: September 2011
Posts: 370

he good

Tue, 12 Jun 2012, 05:31am