第十六周專案1 陣列的排序

2021-06-27 13:58:04 字數 539 閱讀 1365

#include using namespace std;

void sort(int *p, int num); //不要對自定義函式的宣告有任何改動

void output(int*, int); //形式引數的名稱可以不要

int main( ) //不要對main函式有任何改動

; int b[15]=;

sort(a,20); //用冒泡法按降序排序a中元素

output(a,20); //輸出排序後的陣列

sort(b,15); //用冒泡法按降序排序b中元素

output(b,15); //輸出排序後的陣列

第十六周專案1 陣列的排序

檔名稱 test.cpp 完成日期 2014年 12月 10 日 版本號 v1.0 問題描述 將陣列的數排序 程式輸入 程式輸出 排序後的陣列 include using namespace std void sort int p,int num void output int int int ma...

第十六周專案1

檔名稱 1.cpp 完成日期 2016年9月12日 版本號 v1.0 1 氣泡排序 include define maxsize 20 typedef int keytype 定義關鍵字型別 typedef char infotype 10 typedef struct 記錄型別 rectype 排...

第十六周專案1 氣泡排序

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