java - Stuck in Indenting spaces according to numbers using a nested loop -


i need help. want program print different numbers according user's input , indent number number of spaces well. must using nested loop.

expected output: (lets user types 3)

0    1   2    3 

for simplicity i'm showing did in nested loop , ignoring user's input portion.

what did:

for (i=0; i<=usernum; i++)    {      (j=0; j<=i; j++)       {         ? (i think here problem don't know how indent no of spaces)      }      system.out.println(i);   }   

thanks in advance!

inside loop should use

system.out.print(" "); 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -