English
首页
论坛
博客
多用户博客
在线工具
在线手册
开通博客赚积分
发布资源赚积分
分类
源码开发语言/平台
当前位置:
首页
> 源码/资料 >
Windows编程
>
C#编程
> 查看源码
7_4.cpp
资源名称:
c.rar [点击查看]
上传用户:
puke2000
上传日期:
2022-07-25
资源大小:
912k
文件大小:
0k
源码类别:
C#编程
开发平台:
Visual C++
7_4.cpp:源码内容
//7_4
void Swap(int& a, int& b){ int temp=a; a=b; b=temp; }
void Bsort(int a[], int n)
{
bool dontLoopAgain=false;
while(dontLoopAgain=!dontLoopAgain)
for(int i=0,pass=--n; i<n; i++)
if(a[i]>a[i+1]){
dontLoopAgain=false;
Swap(a[i],a[i+1]);
}
}