您的位置:首页 > 编程语言 > C#

c#第二章课后第二题

2016-11-09 09:39 936 查看
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int[] number = new int[] {1,2,3,4,5 };
Console.Write("输出数组中的数据:");
foreach(int i in number)
{

if(i==3)
{
continue;
}else if(i==5)
{
break;
}

Console.Write(i+" ");

}
Console.ReadLine();
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: