第十六周專案1 (1)氣泡排序

2021-07-25 08:53:30 字數 770 閱讀 7547

/*   

* 檔名稱:專案1.cpp

* 作 者:高金豔

* 完成日期:2023年12月13日

* 版 本 號:v1.0

*問題描述:驗證氣泡排序,完成測試。

*輸入描述:無

*程式輸出:測試資料

*/

**:

#include #define maxsize 20  

typedef int keytype; //定義關鍵字型別

typedef char infotype[10];

typedef struct //記錄型別

rectype; //排序的記錄型別定義

void bubblesort(rectype r,int n)

rectype; //排序的記錄型別定義

void bubblesort1(rectype r,int n)

{ int i,j,k,exchange;

rectype tmp;

for (i=0; ii; j--) //比較,找出最小關鍵字的記錄

第十六周專案1 (1) 氣泡排序

all right reserved 檔名稱 main.cpp 完成日期 2016年12月16日 版本號 v1.0 問題描述 已知乙個關鍵字序列為if while for case do break else struct union int double float char long bool,...

第十六周專案1 氣泡排序

檔名稱 main.cpp 完成日期 2015.12.14 版本號 v1.0 問題描述 給定序列,採用氣泡排序的演算法,描述排序的過程 include define maxsize 20 typedef int keytype 定義關鍵字型別 typedef char infotype 10 type...

第十六周 專案一 氣泡排序

ifndef btree h included define btree h included 煙台大學計控學院 作 者 林穎 完成日期 2016年12月10日 問題描述 用序列作測試資料,驗證氣泡排序 endif btree h included cpp view plain copy inclu...