哪里出錯(cuò)了?????
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? //聲明整型數(shù)組,保存一組整數(shù)
? ? ? ? ? ? int[] num = new int[] { 3,34,43,2,11,19,30,55,20};
? ? ? ? ? ? bool beishu=false;
? ? ? ? ? ? for(int m=0;m<num.Length;m++){
? ? ? ? ? ? ? ? if(num[m]%7==0){
? ? ? ? ? ? ? ? ? ? beishu=true;
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? if(beishu)
? ? ? ? ? ? { Console.WirteLine("有7的整倍數(shù)");}
? ? ? ? ? ? else
? ? ? ? ? ? {Console.WriteLine("沒(méi)有7的整倍數(shù)"); }
? ? ? ? ? ??
? ? ? ? }
? ? }
}
2017-07-09
?【【【 { Console.WirteLine("有7的整倍數(shù)");}】】】
? ? ? ? ? ? else
? ? ? ? ? ? {Console.WriteLine("沒(méi)有7的整倍數(shù)"); }
倒數(shù)第三行代碼拼寫(xiě)錯(cuò)誤,Write拼寫(xiě)成Wirte
2017-01-19
它這個(gè)好像要求用foreach才算對(duì)