Nested loops C# with Example



Nested loops C# with Example

// Print the multiplication table up to 5s 
for (int i = 1; i <= 5; i++) 
{ 
for (int j = 1; j <= 5; j++) 
{ 
int product = i * j; 
Console.WriteLine("{0} times {1} is {2}", i, j, product); 
} 
} 

0 Comment's

Comment Form

Submit Comment