编写程序,读入一个整数数组,删除值相同的多余元素,输出新的数组答:importjava.util.Arrays;publicclassTest2{publicstaticvoidmain(String[]args){int[]a={1,1,4,4,3,3,5,3,8,0,5,1};System.out.println("输入的数组为:"+Arrays.toString(a));a=Arrays.stream(a).distinct().toArray();System.out.println("删除相同后的数组为:"+Arrays.toString(a))...
C#数组中,把相同的元素提取出来,放入另一个数组中答:string[] array=new string[]{ "7","4","7","1","4","1","5","2","5"} List<string> strList0=new List<string>();//原始数据 List<string> strList1=new List<string>();//数组一,Array1 List<string> strList2=new List<string>();//数组二,Array2 for(int i=0;i...