bool x = false; for (int i = 0; i < num.Length; i++)
{ if (num[i] % 7 == 0) { x = true; break; } } if (x) Console.WriteLine("有7的整倍数"); else Console.WriteLine("没有7的整倍数");
莔0
相关分类