acemo
10-17-2006, 06:33 PM
The current value of tabs can be 1, 2, 3, 4 or even 12315.
The loop will only place 1 tab on the screen.
My code:
if(tabs > 0)
{
for(int i = 0; i < tabs; i++);
{
System.out.print("\t");
}
}
What am i doing wrong here?
Edit: found the error, i putted a ; behind the for loop wich ended the "do" part of the loop.
The loop will only place 1 tab on the screen.
My code:
if(tabs > 0)
{
for(int i = 0; i < tabs; i++);
{
System.out.print("\t");
}
}
What am i doing wrong here?
Edit: found the error, i putted a ; behind the for loop wich ended the "do" part of the loop.