| |

VerySource

 Forgot password?
 Register
Search
Author: kindred13

Little question. ^-^

[Copy link]

0

Threads

8

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-21 20:45:01
| Show all posts
Plus:
zxlu=aa[0]; lxlr=aa[1]; rzck=aa[2]
sjbs=aa[3]; xxcx=aa[4]; xxts=aa[5];

Just OK!!
Reply

Use magic Report

0

Threads

8

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-22 13:45:01
| Show all posts
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 can be changed;
           String [] aa=new string[6];
/*zxlu="-" lxlr="-" rzck="-"
sjbs="." xxcx="." xxts="."
Should be defined as an array! ! */

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];

        }
    }
}



}
The above has been tested and passed! !
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list