#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
標簽: 查詢學會少年宮
上傳時間: 2016-12-29
上傳用戶:767483511
#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(); }
標簽: 學生專用
上傳時間: 2016-12-29
上傳用戶:767483511
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
#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
道路車輛——電氣及電子設備的環(huán)境條件和試驗
上傳時間: 2021-10-25
上傳用戶:
012基于51單片機跑步機啟停速度控制模塊設計(包含仿真和源程序)仿真:程序:
上傳時間: 2021-11-07
上傳用戶:
STM32L475開發(fā)板PDF原理圖+AD集成3D封裝庫+主要器件技術手冊,集成封裝庫型號列表如下:Library Component Count : 44Name Description----------------------------------------------------------------------------------------------------ANT-2.4G ANT,2.4G,PCB天線ATK-TEST-1*4-2.54mm 測試點ATK_MODULE 單排母,1*6,2.54mmBEEP 3.3V有源蜂鳴器BUTTON_DIP3 撥動開關SS-12F44C-0402-SMD C-0603-SMD C-CAP-SMD-220uF/10V C-CEP-220uF/16V D-1N4148 Header-1*3-2.54mm 單排針-2.54mmHeader-2*10-2.54mm 雙排針-2.54mmHeader-2*2-2.54mm 雙排針-2.54mmHeader-2*3-2.54mm 雙排針-2.54mmHeader-2*4-2.54mm 雙排座-2.54mmIR-LED 1206紅外發(fā)射管(側)IR-LF0038GKLL-1 紅外接收管SMDJ-MICRO-USB-5S Micro USB 5.9有柱腳長1.25加長針L-0420-4.7uH 電感,4.7uH,3ALCD-TFT-H13TS38A LCD,TFT,1.3'240*240,禹龍LED-0603-RED 發(fā)光二極管-紅色LED-RGB-1615-0603 RGB,共陽,1615,0603MIC-6022 MICMotor-SMD 電機,SMDPhone-3-M 耳機座,三節(jié)R-0402-SMD 貼片電阻R-0805-SMD 貼片電阻RT9193-3.3S-KEY-SMD-324225 KEY,SMD,324225S8050-SMD SD-MICRO-TF SD,MICRO,TFU-AHT10 Sensor,溫濕度傳感器U-AP3216C Sensor.光照/距離U-AP6181 WIFI Module,SDIOU-ES8388 AUDIO,2-ch DAC,2-ch ADCU-ICM-20608 三軸陀螺儀/三軸加速度計,U-L9110S 電機驅動,800mAU-RT9013-3.3 LDO,500mAU-STM32F103C8T6 U-STM32L475VET6 MCU,LQFP100,512K FLASH,128K RAMU-W25Q128 SPI FLASH,16MY-12M-SMD 晶振 - 12M貼片Y-3215-32.768K XTAL,3215,32.768KY-3215-8M XTAL,3215,8MHz
上傳時間: 2021-12-15
上傳用戶:
The PW8205A8TS is the highest performance trench N-ch MOSFETs with extreme high cell density,which provide excellent RDSON and gate charge for most of the small power switching and loadswitch applications. The meet the RoHS and Product requirement with full function reliabilityapproved .
標簽: 8205a8
上傳時間: 2022-02-14
上傳用戶:wangshoupeng199
#include "NUC1xx.h"#include "Hal.h"#include "pwm.h"//wait current PWM cycle done, otherwise there maybe short pulse on FETvoid PWM_Stop(U8 ch){ switch(ch) { case PWM_CHANNEL_A: PWMA->u32CNR1 = 0; PWMA->u32CMR1 = 0; while(PWMA->u32PDR1 != 0); break; case PWM_CHANNEL_B: PWMA->u32CNR2 = 0; PWMA->u32CMR2 = 0; while(PWMA->u32PDR2 != 0); break; case PWM_CHANNEL_C: PWMA->u32CNR3 = 0; PWMA->u32CMR3 = 0; while(PWMA->u32PDR3 != 0); break; default: while(1); } PWMA->u32POE &= ~(1<<ch); PWMA->u32PCR &= ~(1<<(ch*8));}
上傳時間: 2022-06-01
上傳用戶:kingwide
本文針對國內(nèi)外組態(tài)軟件的不足,設計了基于C#的上位機監(jiān)控組態(tài)軟件。本軟件適用于中小型企業(yè)、易于操作并具有一定通用性。從軟件結構來看,該軟件包括圖形界面模塊和提供數(shù)據(jù)服務的數(shù)據(jù)庫模塊,重點介紹了圖形界面和數(shù)據(jù)庫模塊的設計。為達到小巧并且簡單易用的目的,將圖形界面的功能化到最簡,用商用數(shù)據(jù)庫sQL2005作為軟件的數(shù)據(jù)庫。本設計將上位機組態(tài)軟件分成系統(tǒng)開發(fā)環(huán)境和系統(tǒng)運行環(huán)境兩部分,給出了軟件的總體設計結構圖。本文介紹了軟件的各子系統(tǒng)的設計,重點闡述了圖形界面子系統(tǒng)和數(shù)據(jù)庫子系統(tǒng).在圖形界面子系統(tǒng)中,首先設計了圖形界面子系統(tǒng)的總體結構,并介紹了與繪圖程序相關的類和函數(shù)。結合工藝需要設計了圖形繪制工具并實現(xiàn)了圖形的動畫連接,以鏈表結構保存組態(tài)好的圖形文件。圖形界面子系統(tǒng)采用基于矢量圖的設計方法,實現(xiàn)圖形繪制、圖形屬性設置、圖形編輯功能和圖形文件存取等功能,解決了圖形界面動畫連接的幾個常見問題,最終實現(xiàn)動畫連接。在數(shù)據(jù)庫子系統(tǒng)中,先介紹了生產(chǎn)現(xiàn)場中對變量的分類,并列出存儲變量的數(shù)據(jù)庫表的結構,實現(xiàn)了現(xiàn)場檢測參數(shù)的自動存儲,并自動更新數(shù)據(jù)庫.根據(jù)vO信號進行數(shù)據(jù)單元配置,完成數(shù)據(jù)庫的組態(tài),數(shù)據(jù)庫通過數(shù)據(jù)采集程序對現(xiàn)場數(shù)據(jù)進行讀寫,并按照設定好的存儲策略將其保存到歷史數(shù)據(jù)庫中。數(shù)據(jù)庫子系統(tǒng)實現(xiàn)通信,對象查找,內(nèi)容修改更新等功能。采用Windows XP作為系統(tǒng)開發(fā)環(huán)境,Visual CH作為開發(fā)工具.
標簽: 上位機 監(jiān)控軟件
上傳時間: 2022-06-26
上傳用戶: