logo
  • 教程列表
  • SO官方文档
  • 循环
    • Foreach 循环
    • for 循环
    • 做 - 循环
    • 循环风格
    • 嵌套循环
    • 打破
    • 循环
    • 继续
  1. StackOverflow 文档
  2. C# Language 教程
  3. 循环
  4. 嵌套循环

嵌套循环

Created: November-22, 2018

// 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);
    }
}
  • 打破
  • 循环风格

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明