|
发表于 2020-7-22 13:45:01
|
显示全部楼层
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.IO;
namespace Con070107
{
class Program
{
static void Main(string[] args)
{
string a = "1,2,5";//a可以变化;
String [] aa=new string[6];
/*zxlu="-" lxlr="-" rzck="-"
sjbs="." xxcx="." xxts="."
应该定义为一个数组!! */
for(int i=1 ;i<=6;i++)
{
if (a.IndexOf(i.ToString()) >=0)
aa[i-1] = "-";
else
aa[i-1] = ".";
}
/* for (int i = 0; i <= 5; i++)
{
System.Console.WriteLine(aa[i]);
} */
zxlu=aa[0]; lxlr=aa[1]; rzck=aa[2] ;
sjbs=aa[3]; xxcx=aa[4]; xxts=aa[5];
}
}
}
}
以上已测试通过!!
|
|