freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

大學(xué)計算機基礎(chǔ)實驗報告-文庫吧

2025-10-15 02:43 本頁面


【正文】 報告計算機軟件技術(shù)基礎(chǔ)實驗報告自動化0901班郝萬福學(xué)號:20092395 實驗1:線性表的排序與查找目的:掌握數(shù)據(jù)結(jié)構(gòu)的基本概念、線性表的基本操作以及查找和排序方法的設(shè)計。內(nèi)容:鍵盤輸入一組無序數(shù)據(jù),添加到線性表中; 排序線性表并輸出排序結(jié)果;鍵盤輸入一個數(shù),并插入到排好序的線性表中(要求插入后的表仍為有序表),輸出結(jié)果;鍵盤輸入一個數(shù),并從線性表中刪除相應(yīng)的數(shù)據(jù),輸出結(jié)果。要求:程序清單;運行過程及運行結(jié)果。實驗代碼:/**/include “” include “iostream” include // 程序?qū)崿F(xiàn)有各種方法,這里給出一個實例。// 定義一個線性表const int nMaxSize = 15。// 最大值 int nLen = 0。// 定義操作 void LSort()。void LOut()。void LInsert(int n)。void LDelete(int n)。int main(){// 輸入數(shù)據(jù)并放入線性表中printf(“Please input datan”)。// std::cout // 表中元素個數(shù)int nLinearList[nMaxSize]。班級:自動化 0901 班 姓名:郝萬福 學(xué)號:20092395編譯環(huán)境: Visual Studio 2011 Windows 7 x8664 旗艦版} for(int i = 0。i }LSort()。// 排序線性表 LOut()。// 輸出結(jié)果 scanf(“%d”,amp。nIn)。nLen++。//std::cin nIn。nLinearList[i] = nIn。printf(“Please input a data to insert n”)。scanf(“%d”,amp。nIn)。LInsert(nIn)。LOut()。printf(“Please input a data to delete n”)。scanf(“%d”,amp。nIn)。LDelete(nIn)。LOut()。char chTmp。printf(“Please input a char to finish this program.”)。chTmp = getch()。return 0。// 輸入一個數(shù)字,并從線性表中刪除 // 輸入一個數(shù)字,并插入到線性表中void LSort(){}void LOut(){// 冒泡排序,由大到小for(int j=0。j} for(int i=0。iif(nLinearList[i]int temp=nLinearList[i]。nLinearList[i]=nLinearList[i+1]。nLinearList[i+1]=temp。} printf(“n”)。for(int i = 0。i nLen。i++){} } printf(“%d, ”, nLinearList[i])。printf(“n”)。void LInsert(int n){ nLen++。nLinearList[nLen] = n。for(int k=0。k實驗結(jié)果:實驗2:棧與隊列的應(yīng)用目的:掌握棧與隊列的基本概念、基本操作及設(shè)計與應(yīng)用。內(nèi)容:鍵盤輸入算數(shù)表達式,并放入隊列當(dāng)中; 應(yīng)用棧的概念設(shè)計表達式求值算法; 輸出表達式求值結(jié)果; 要求:程序清單;運行過程及運行結(jié)果。要求:實現(xiàn)實驗內(nèi)容的SQL語句,以及輸出結(jié)果為檢驗實驗內(nèi)容的有效性而執(zhí)行的SQL語句,例如向數(shù)據(jù)表中插入數(shù)據(jù); 檢驗運行結(jié)果(例如插入、刪除)的SQL語句,以及輸出的結(jié)果。實驗代碼:/**/include “” include include include include using namespace std。const int MAX_LEN = 10。// 定義一個隊列的結(jié)構(gòu)struct QUEUE {int nMaxSize。int nCount。int nFront。// 最大值 // 個數(shù) // 頭// 字符串的長度const int MAX_SIZE = 30。// ?;蜿牭淖畲笤貍€數(shù) 班級:自動化 0901 班 姓名:郝萬福 學(xué)號:20092395編譯環(huán)境: Visual Studio 2011 Windows 7 x8664 旗艦版int nRear。// 尾char szQueue[MAX_SIZE][MAX_LEN]。} 。//定義一個棧的結(jié)構(gòu)struct STACK {// 隊列的操作void InitQueue(QUEUE *q,int nMaxSize){} void InQueue(QUEUE *q, char *pItem){} void OutQueue(QUEUE *q, char *pItem){if(qnCount == 0){} qnCount。int i。printf(“隊列已空n”)。getch()。return 0。if(qnMaxSize == qnCount){} qnCount++。int i。for(i=0。inFront ++。return。qszQueue[qnFront][i]= pItem[i]。printf(“隊列已滿n”)。getch()。return 0。qnMaxSize=nMaxSize。qnCount=0。qnFront=0。qnRear=0。int nMaxSize。int nTop。// 最大值 // 棧頂char szStack[MAX_SIZE][MAX_LEN]。} ST。}for(i=0。inRear ++。return。pItem[i] = qszQueue[qnRear][i]。//棧的操作void InitStack(STACK *s,int nMaxSize){} void PushStack(STACK *s, char *pItem){} void PopStack(STACK *s, char *pItem){ if(snTop == 0){} printf(“堆棧已空n”)。getch()。return 0。if(snTop == snMaxSize1){} for(
點擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1