好久没有用冒泡排序了。。

贴一个最常用的。。

	for (int i=0;i<10;i++)
		for(int j=0;j<10-1-i;j++)
		{
			if (a[j]<a[j+1])
			{
				temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
			}
		}

相关文章:

  • 2021-12-05
  • 2021-11-19
  • 2021-06-29
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-04-27
  • 2018-03-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2018-10-13
  • 2021-06-11
  • 2022-12-23
相关资源
相似解决方案