[c++]选择排序
来源:互联网 发布:淘宝商家联盟 编辑:程序博客网 时间:2024/05/22 14:53
#include<iostream>using namespace std;const int N=11;int main(){ int i,j,temp,b; int a[11]={25,36,56,88,96,45,10,33,2,36,155}; for(i=0;i<N-1;i++) { temp=i; for(j=i+1;j<N;j++) { if(a[temp]>a[j]) temp=j; } if(i!=temp) { b=a[temp]; a[temp]=a[i]; a[i]=b;} } for(i=0;i<N;i++) cout<<a[i]<<' '; cout<<endl;}
0 0
- C语言选择排序
- 选择排序 C
- C算法-选择排序
- c语言选择排序
- 选择排序C实现
- c语言选择排序
- C语言---选择排序
- C语言 选择排序
- 选择排序(C语言版)
- c 选择排序
- c语言选择排序
- C实现选择排序
- [c++]选择排序
- 【C语言】选择排序
- linux c选择排序
- C语言:选择排序
- C 简单选择排序
- C经典 选择排序
- JDK自带的二分查找算法和自己写的普通二分查找算法的比较(java二分查找源代码)
- Python学习笔记(二):语句、数据类型(快速入门篇)
- ThreadPoolExecutor线程池的使用
- 第14题
- 纯CSS写弹出层样式
- [c++]选择排序
- 整数划分问题——动态规划
- c语言之统计元音
- poj 3317 Stake Your Claim(极大极小搜索+记忆化搜索+状态压缩)
- void Oxygen::ComboBoxData::setButton(GtkWidget*): Assertion `!_button._widget' failed.
- 关于加班效率的思考
- UILabel 详解
- [c++]快速排序
- dfdgdg gdg