This week's book giveaway is in the JavaScript forum. We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line! See this thread for details.

Change 77777 into 077777 - that makes it the octal representation of 32767. The loop guard would be "while (count < 0100000)". Instead of 8 you can use 010. You see, by adding a 0 before the number the compiler uses base-8*, just like adding 0x at the starts makes it base-16* or HEX. 010 is nothing more than 1*8^1 + 0*8^0, and 077777 is 7*8^4 + 7*8^3 + 7*8^2 + 7*8^1 + 7*8^0

For the purists: base-10, since everything is base-10
For those that don't get it - read it as base-one-zero, not base-ten.

Rob Prime wrote:Change 77777 into 077777 - that makes it the octal representation of 32767. The loop guard would be "while (count < 0100000)". Instead of 8 you can use 010. You see, by adding a 0 before the number the compiler uses base-8*, just like adding 0x at the starts makes it base-16* or HEX. 010 is nothing more than 1*8^1 + 0*8^0, and 077777 is 7*8^4 + 7*8^3 + 7*8^2 + 7*8^1 + 7*8^0

For the purists: base-10, since everything is base-10
For those that don't get it - read it as base-one-zero, not base-ten.

i did what you told me to do.. it gives me an octal representation, but i should get a decimal or some other presentation that would make the numbers reach 77777.
the instructions to do this exercise are so tricky.

i think, that the persentation should be something like that...
1
2
3
4
5
6
7
8
11
12
13
14
15
16
17
18
20
21
22
23
24
..
..
..
..
..
77775
77776
77777

i am not 100% sure.
but the instruction that i got was to make the application display all the numbers from 0 to 77777 (octal)

i think you are close to the answer, because that is how you get an octal number (8^1 2*8^2....)

but in practice how do i feed that formula into a loop, do i need one or two loops?

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

usually i use basic operators and i am learning how to use a loop. but i am not sure how to use 2 loops, cause i think in this problem i need to use 2 loops