請大佬指明
{
? ? ? ? ??
? ? ? ? ? ? //聲明整型數組,保存一組整數
? ? ? ? ? ? int[] num = new int[] { 3,34,43,2,11,19,30,55,20};
? ? ? ? ? ? //請完善代碼,判斷數組中有沒有7的整倍數
? ? ? ? ? ? ?bool has7=false;
? ? ? ? ? ? ?foreach(int x in num){
? ? ? ? ? ? ? ?if( x % 7== 0 ){
? ? ? ? ? ? ? ? ? ?has7=ture;
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?}
? ? ? ? ? ?}
? ? ? ? ? ?if(has7)
? ? ? ? ? ? ? ?Console.WriteLine("有7的整倍數");
? ? ? ? ? ?
? ? ? ? ? ?else
? ? ? ? ? ? ? ?Console.WriteLine("沒有7的整倍數");
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? }
2019-10-21
我知道了,true