doubt in for loop

Feb 19 2015 3:47 AM
hello friends,
i am having a doubt,
here there are four for loop statement are there,  
 
example:
here n =  5;
 
first for loop  check the =>  i  =>      1 <=5 condition true than move to next loop called j.
now second  => j = 0 , 0< 4 condition true than print the space 
 
now my doubt is, when the third for loop will execute whether the second loop got over or when.
please tell me anyone detaily.. 

for (int i = 1; i <= n; i++)

{

for (int j = 0; j < (n - i); j++)

Console.Write(" ");

for (int j = 1; j <= i; j++)

Console.Write("*");

for (int k = 1; k < i; k++)

Console.Write("*");

Console.WriteLine();

}

 
 
 

Answers (5)