#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i<j;i++) printf("%5d",add[i]); if(i%5==0) printf("\n"); getch(); fclose(fp); } else printf("Sorry!Cannot find the word(^_^)"); } main() { char pd[10],choose='y'; int flag=1; while(flag) {printf("In put the word you want to seqarch:"); scanf("%s",pd); search(strlwr(pd)); printf("\nWould you want to continue?(Y/N):"); getchar(); scanf("%c",&choose); if((tolower(choose))=='n') flag=0; else flag=1; } printf("Thanks for your using!Bye-bye!\n"); getch(); }
標(biāo)簽: 學(xué)生專用
上傳時間: 2016-12-29
上傳用戶:767483511
遺傳算法,已調(diào)試,zhu shi fei chang qing chu
標(biāo)簽: tiaoshiguo 算法
上傳時間: 2017-05-01
上傳用戶:caoge
notepad2_4.2.25漢化資源文件 CSDN-tags:notepad2 sChinese 中文rc資源 Notepad2中文資源修改自: http://www.flos-freeware.ch/zip/notepad2_4.2.25_src.zip\src\Notepad2.rc
上傳時間: 2018-09-08
上傳用戶:xxagri
低頻治療儀是微波治療儀的一種,主要利用電磁波的較低頻段進行醫(yī)療保健
標(biāo)簽: 單片機 調(diào)制中頻 系統(tǒng)設(shè)計
上傳時間: 2019-03-27
上傳用戶:caoliangxing
#include <stdio.h> #include <stdlib.h> #define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t請輸入稀疏矩陣的行數(shù),列數(shù)和非零元素個數(shù)(用逗號隔開):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t輸入非零元素值(格式:行號,列號,值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t對角線元素的和::%d\n",p->v); else printf("\n\t\t對角線元素的和為::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t 稀疏矩陣的三元組系統(tǒng) "); printf("\n\t\t*********************************"); printf("\n\t\t 1------------創(chuàng)建 "); printf("\n\t\t 2------------顯示 "); printf("\n\t\t 3------------求對角線元素和"); printf("\n\t\t 4------------返回 "); printf("\n\t\t*********************************"); printf("\n\t\t請選擇菜單號(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t輸入錯誤!請重新輸入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }
上傳時間: 2020-06-11
上傳用戶:ccccy
磁場理論,清華大學(xué)電子與信息技術(shù)系列教材。王 薔 李國定 龔 克 編著 詳細(xì)講述電內(nèi) 容 提 要 本書系統(tǒng)地介紹了電磁場理論的基本內(nèi)容 , 包括靜電場、恒定磁場、準(zhǔn)靜態(tài)場、 時變場、電磁波在無界空間的自由傳播、導(dǎo)波和電磁波的激勵。比較系統(tǒng)地介紹了 求解電磁問題的幾種嚴(yán)格的解析方法 ,也討論了近年來出現(xiàn)的計算電磁學(xué)中常用 的幾種數(shù)值計算方法的基本原理, 并介紹了電磁場理論在電磁兼容性中的應(yīng)用。 為便于讀者掌握基本理論 , 對重要的物理概念從不同的角度加以闡述 ,并在各章中 都列出了較多的典型例題和習(xí)題。 該書適于作為高等院校無線電技術(shù)專業(yè)本科生的教材 , 也可供從事電磁場理 論、微波技術(shù)、天線和電磁兼容性領(lǐng)域工作的科技人員閱讀和參考。
標(biāo)簽: 電磁場
上傳時間: 2021-01-15
上傳用戶:
2SC3356 NPN 微波低噪聲晶體管
上傳時間: 2021-07-03
上傳用戶:xiangshuai
道路車輛——電氣及電子設(shè)備的環(huán)境條件和試驗
上傳時間: 2021-10-25
上傳用戶:
Research on microwave power amplififiers has gained a growing importance demanded by the many continuously developing applications which require such subsystem performance. A broad set of commercial and strategic systems in fact have their overall performance boosted by the power amplififier, the latter becoming an enabling component wherever its effificiency and output power actually allows functionalities and operating modes previously not possible. This is the case for the many wireless systems and battery-operated systems that form the substrate of everyday life, but also of high-performance satellite and dual-use systems.
標(biāo)簽: 高效率 射頻 微波 固態(tài) 功率放大器
上傳時間: 2021-10-30
上傳用戶:得之我幸78
濾波器設(shè)計紅寶書,理論與實踐并存,非常使用,值得參考。
上傳時間: 2021-11-22
上傳用戶:wangshoupeng199
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1