用C语言或c++咋写出代码从2 4 6 8 10,五个数中选2个的所有组合及组合数目
int arr[]{2,4,6,8,10}; for(int i=0;i<5;i++) for(int j=i+1;j<5;j++) { printf("%d,%d",arr[i],arr[j]); }