I'll use java code to try to bypass the stupid code formatting so it doesn't show the format instead of showing how to make the format, which is what I'm aiming for.
String str = "highlight=java";...
Type: Posts; User: javapenguin
I'll use java code to try to bypass the stupid code formatting so it doesn't show the format instead of showing how to make the format, which is what I'm aiming for.
String str = "highlight=java";...
Well, hmmm...without arrays,
Not sure if Integers can have their values reset like this.
Integer i;
String str = "";
for (int x =0, x < 8, x++)
{
i = (Integer) Math.pow(2,x); // casting...
Hmmmm..use an array. An array of Strings.
Get it to print your current value plus all the values you want before it till it gets to 1.
You want an array with 8 places.
Also an int array...
Well, perhaps you could have an incrementing for loop and a decrementing for loop.
The idea here is to use recursion to get it to print x plus all the x/2 till x is 1.
if num = 1, print 1;
...