這樣哪里有問題
? ? ? bool s=false;
? ? ? ? ? ?for(int? i=0;i<num.Lenght;i++)
? ? ? ? ? ?{
? ? ? ? ? ? ? ?if(num[i]%7==0)
? ? ? {? ? ? ?? s=true;
? ? ? ? ? ? ? ?break;
? ? ? ? ? ?}
? ? ? ? ? ?if(s)
? ? ? ? ? ?Console.WriteLine("有7的整倍數(shù)");
? ? ? ? ? ?else
? ? ? ? ? ?Console.WriteLine("沒有7的整倍數(shù)");
2016-09-20
題目要求你用?foreach語句,所以用for會(huì)判定錯(cuò)誤
2016-09-20
阿西吧,沒注意這個(gè)梗