Nested loops
suggest change// 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);
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents