// bubble.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include"iomanip.h"#include "iostream.h" #define MAXSIZE 100//交换两个元素的值void swap(int &a,int &b){ int temp; temp = a; a = b; b = temp; [阅读全文] [PDF]
把数组中的n个元素由小到大进行排序
输入:数组的个数n,数组A【】
输出:按递增顺序排序的数组A【】
// bubble.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include"iomanip.h"#include "iostream.h" #define MAXSIZE 100//交换两个元素的值void swap(int &a,int &b){ int temp [阅读全文] [PDF]
1 共2条 分1页
- 学习日记 Date-09108
- 排序算法:合并排序算法
- 冒泡排序算法:改进的冒泡算法
- 模板函数、函数模板 模板类、类模板
- 编程珠矶学习笔记(6)--测试及性能(基本的)
- 冒泡排序法:插入法排序
- c语言冒泡法排序:冒泡法排序
- c语言冒泡法排序:冒泡法排序
- uclinux:uClinux和Linux的异同分析
- uclinux:uclinux 多任务(各家的言)
- gsoap:gSoap中文支持
- c语言const用法:C++中const使用方法整理总结
- 创建单链表:单链表的创建
- 最小生成树的普里姆算法
- hdoj1020:HDOJ_1863(畅通工程)
- C++中自增和自减操作符的重载
- c结构体中的指针:C++中的引用和指针
- linux开发工具:Linux下C++开发工具介绍(转载)
- 动态分配数组:在C++中实现变长数组 动态分配数组
- 重新认识:第 2章 基础决定上层建筑——2.1重新认识helloworld