static void Main(string[] args)
{
int[] hs = { 1,2,3,4,5,6,7,8,9};
int ligh = hs.Length;
while (ligh > 0)
{
Console.WriteLine(hs[ligh - 1]);
ligh -= 1;
}
Console.ReadKey();
}
static void Main(string[] args)
{
int[] hs = { 1,2,3,4,5,6,7,8,9};
//倒叙打印只需要修改一下判断条件即可
for (int i = 0; i < hs.Length; i++)
{
Console.WriteLine(hs[i].ToString());
}
Console.ReadKey();
}
static void Main(string[] args)
{
int[] hs = { 1,2,3,4,5,6,7,8,9};
//这里用到了var关键字,匿名类型(由编译器自动推断),你可以把它换成int
foreach (var item in hs)
{
Console.WriteLine(item.ToString());
}
Console.ReadKey();
}
int i;
for(i=1;i<=10;++i)
{
Console.WriteLine("{0}",i);
}
for(int i=1;i<=10;++i)
{
Console.WriteLine("{0}",i);
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有