恭喜,你发布的帖子
发布于 2015-12-04 10:12:19
6楼
int no[6] = {1, 2, 3, 4, 5, 6};
float data[6];
for(int i = 0; i != 6; ++i)
{
for(int j = i + 1; j != 6; ++j)
{
int t = 0;
if(data[no[i] > data[no[j]])
{
t = no[i]; no[i] = no[j]; no[j] = t;
}
}
}
请填写推广理由:
分享
只看
楼主