[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
a code i cant make work...  XML
Forum Index » New to Java
Author Message
NewOrder

Newbie

Joined: 06/22/2010 05:04:50
Messages: 7
Offline




my task is to use a loop,, i need the loop to go till 77777

the problem is that the numbers need to be octagon type.. 1-8 instead of 1-10. i have no idea how to make that conversion. i created 2 loops...

i tried to come up with a code for 2 hours. but no luck


here is my code so far..


it should count the numbers like that:


12345678 then add another series to this one..

12345678

so it would be 1+1 2+2 3+3.....

until it reaches 77777

This message was edited 1 time. Last update was at 06/22/2010 05:32:30

stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Are you allowed to use other Java classes? You could do something like:




Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
NewOrder

Newbie

Joined: 06/22/2010 05:04:50
Messages: 7
Offline

NO, you can use basic stuff, like the basic operators.. (including trilienar operator)

, no advanced for or classes allowed.. basic stuff


i need to make it so that it would add a series of 1-8 with another 1-8 until you reach 77777.

those were the instructions, to display octal numbers from 0-77777

no idea how it is done, but it must have a loop and a few basic operators

This message was edited 1 time. Last update was at 06/22/2010 08:06:07

stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

How about something seriously ugly?



The empty strings ("" have to be there or the + signs will be interpreted as math addition.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
NewOrder

Newbie

Joined: 06/22/2010 05:04:50
Messages: 7
Offline

Stud. that ugly thing was the answer!!


thanks!!!!

This message was edited 1 time. Last update was at 06/23/2010 17:31:14

 
Forum Index » New to Java
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle