In the 1-2-3-4,
Known to xiao Ming to take up the position 2 are respectively 2 and 3
Q: how to find out xiao Ming didn't occupy seats? (no. 1 and no. 4)
CodePudding user response:
Int [] array=new int [] {1, 2, 3, 4};Int [] XM=new int [] {2, 3};
For (int I=0; i
If (array [I]! XM [0]=& amp; & Array [I]!=XM [1])
{
Console. WriteLine (" xiao Ming didn't account for the seat is {0} ", array [I]);
}
}
Console.ReadKey();
CodePudding user response:
Int [] array=new int [] {1, 2, 3, 4};Int [] XM=new int [] {2, 3};
Array=array. Except (XM). ToArray ();
CodePudding user response:
Is this for difference set?Never dull
CodePudding user response: