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

正文內(nèi)容

最新數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)(編輯修改稿)

2024-07-26 02:42 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 txt文件單詞個(gè)數(shù),\n本次統(tǒng)計(jì)耗時(shí):%dms\n,files_num,clock()t1)。 printf(注:統(tǒng)計(jì)結(jié)果存放于%s目錄下\n,pathOut)。}void InitSqString(SqString amp。s,char str[]){ int i。 for(i=0。str[i]!=39。\039。i++){ [i]=str[i]。 } [i]=39。\039。 =i。}//輸出查找結(jié)果到文件void OutFile(SearchOut amp。s,FILE *fout){// if(==0){ fputs(There is no word which you want in this article.\n,fout)。 return。 } for(int i=0。i%100。i++) fprintf(fout,%d\t%d\n,[i],[i])。}//查找單詞int Mate(SqString t){ clock_t t1。 int j=0,page,row,k,rear。 //k為數(shù)組頭指針,first為尾指針 bool flag。 char ch,files[MaxFiles][20],inFile[50],outFile[50]=pathOut。 char temp[81]。 //files存放文件列表數(shù)組MaxFiles為可讀最大文件數(shù),20為文件名長(zhǎng)度 strcat(outFile,)。 unsigned int files_num=0,totaltime=0,usedtime。//文件個(gè)數(shù) getFiles(files_num,files)。 SearchOut s。 FILE *fin,*fout。 if((fout=fopen(outFile,w))==NULL){ printf(Can39。t creat a new txt:%s\n,outFile)。 return 1。 } fprintf(fout,Word \%s\ in every article location(page\trow):\n,)。 for(unsigned int i=0。ifiles_num。i++){ //打開文件 strcpy(inFile,F:\\Test\\paper\\)。 strcat(inFile,files[i])。 if((fin=fopen(inFile,r))==NULL){ printf(can39。t open %s\n,inFile)。 return 1。 } //初始化 =0。 page=row=1。 rear=79。 flag=false。//文件末尾標(biāo)志 fprintf(fout,\n\nWord in %s location:\n,files[i])。 t1=clock()。 while(!flag){ rear++。 for(k=0。rear80。k++,rear++) temp[k]=temp[rear]。 for(。k80。k++)//讀滿temp temp[k]=fgetc(fin)。 k。//k指向最后一個(gè)字符 for(。k=0。k){//k指向最后一個(gè)非字母 if(temp[k]39。A39。||temp[k]39。z39。||(temp[k]39。Z39。amp。amp。temp[k]39。a39。)) break。 } rear=k。//rear指向最后一個(gè)非字母 if(k=0) temp[k]=39。\n39。//換為‘換行符’ k=0。//k指向temp頭 ch=temp[k]。 //開始匹配,直到文章結(jié)束為止 while(k(rear)amp。amp。ch!=EOF) {//rear為temp可讀長(zhǎng)度 j=0。 while(ch==[j]amp。amp。j){ ch=temp[++k]。//指向下一個(gè)字符 j++。 } if(j==){ //匹配 if(ch39。A39。||ch39。z39。||(ch39。Z39。amp。amp。ch39。a39。)){ [%100]=page。 [%100]=row。 ++。//s已滿,輸出并初始化 if(%100==99){ OutFile(s,fout)。 } } } while((ch=39。a39。amp。amp。ch=39。z39。)||(ch=39。Z39。amp。amp。ch=39。A39。)amp。amp。krear)//單詞間以非字母隔開 ch=temp[++k]。 //若為換行符,則行數(shù)加1 if ( ch==39。\n39。) { row++。 if(rowPageSize){//PageSize為最大行數(shù) row=1。 page++。 } } ch=temp[++k]。 } if(ch==EOF) flag=true。 } usedtime=clock()t1。 OutFile(s,fout)。//讀完一篇輸出s fprintf(fout,the numbre of words:%d,)。 fprintf(fout,\nused time:%d,use
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1