Assign integer value to letter

后端 未结 3 1848
别那么骄傲
别那么骄傲 2021-01-14 05:43

So i have this problem. I have Text Box with text containing 12 numbers. So for example 012345678912. Now i don\'t know how to assign the first, then the second .... and so

3条回答
  •  旧巷少年郎
    2021-01-14 06:45

    int x = int.Parse(txtNumbers.Text);
    
    int a[12];
    for(int i=0;i<12;i++)
    {
        a[i] = x %12;
        x = x/10;
    }
    

提交回复
热议问题