| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/22/2010 05:15:53
|
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
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/22/2010 07:44:52
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
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 |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/22/2010 07:59:05
|
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
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/22/2010 13:54:30
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
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 |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/22/2010 23:11:48
|
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
|
|
|
 |
|
|