#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NULL 0 #define MaxSize 30 typedef struct athletestruct /*運動員*/ { char name[20]; int score; /*分數*/ int range; /**/ int item; /*項目*/ }ATH; typedef struct schoolstruct /*學校*/ { int count; /*編號*/ int serial; /**/ int menscore; /*男選手分數*/ int womenscore; /*女選手分數*/ int totalscore; /*總分*/ ATH athlete[MaxSize]; /**/ struct schoolstruct *next; }SCH; int nsc,msp,wsp; int ntsp; int i,j; int overgame; int serial,range; int n; SCH *head,*pfirst,*psecond; int *phead=NULL,*pafirst=NULL,*pasecond=NULL; void create(); void input () { char answer; head = (SCH *)malloc(sizeof(SCH)); /**/ head->next = NULL; pfirst = head; answer = 'y'; while ( answer == 'y' ) { Is_Game_DoMain: printf("\nGET Top 5 when odd\nGET Top 3 when even"); printf("\n輸入運動項目序號 (x<=%d):",ntsp); scanf("%d",pafirst); overgame = *pafirst; if ( pafirst != phead ) { for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ ) { if ( overgame == *pasecond ) { printf("\n這個項目已經存在請選擇其他的數字\n"); goto Is_Game_DoMain; } } } pafirst = pafirst + 1; if ( overgame > ntsp ) { printf("\n項目不存在"); printf("\n請重新輸入"); goto Is_Game_DoMain; } switch ( overgame%2 ) { case 0: n = 3;break; case 1: n = 5;break; } for ( i = 1 ; i <= n ; i++ ) { Is_Serial_DoMain: printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc); scanf("%d",&serial); if ( serial > nsc ) { printf("\n超過學校數目,請重新輸入"); goto Is_Serial_DoMain; } if ( head->next == NULL ) { create(); } psecond = head->next ; while ( psecond != NULL ) { if ( psecond->serial == serial ) { pfirst = psecond; pfirst->count = pfirst->count + 1; goto Store_Data; } else { psecond = psecond->next; } } create(); Store_Data: pfirst->athlete[pfirst->count].item = overgame; pfirst->athlete[pfirst->count].range = i; pfirst->serial = serial; printf("Input name:) : "); scanf("%s",pfirst->athlete[pfirst->count].name); } printf("\n繼續輸入運動項目(y&n)?"); answer = getchar(); printf("\n"); } } void calculate() /**/ { pfirst = head->next; while ( pfirst->next != NULL ) { for (i=1;i<=pfirst->count;i++) { if ( pfirst->athlete[i].item % 2 == 0 ) { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 5;break; case 2:pfirst->athlete[i].score = 3;break; case 3:pfirst->athlete[i].score = 2;break; } } else { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 7;break; case 2:pfirst->athlete[i].score = 5;break; case 3:pfirst->athlete[i].score = 3;break; case 4:pfirst->athlete[i].score = 2;break; case 5:pfirst->athlete[i].score = 1;break; } } if ( pfirst->athlete[i].item <=msp ) { pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score; } else { pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score; } } pfirst->totalscore = pfirst->menscore + pfirst->womenscore; pfirst = pfirst->next; } } void output() { pfirst = head->next; psecond = head->next; while ( pfirst->next != NULL ) { // clrscr(); printf("\n第%d號學校的結果成績:",pfirst->serial); printf("\n\n項目的數目\t學校的名字\t分數"); for (i=1;i<=ntsp;i++) { for (j=1;j<=pfirst->count;j++) { if ( pfirst->athlete[j].item == i ) { printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break; } } } printf("\n\n\n\t\t\t\t\t\t按任意建 進入下一頁"); getchar(); pfirst = pfirst->next; } // clrscr(); printf("\n運動會結果:\n\n學校編號\t男運動員成績\t女運動員成績\t總分"); pfirst = head->next; while ( pfirst->next != NULL ) { printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore); pfirst = pfirst->next; } printf("\n\n\n\t\t\t\t\t\t\t按任意建結束"); getchar(); } void create() { pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct)); pfirst->next = head->next ; head->next = pfirst ; pfirst->count = 1; pfirst->menscore = 0; pfirst->womenscore = 0; pfirst->totalscore = 0; } void Save() {FILE *fp; if((fp = fopen("school.dat","wb"))==NULL) {printf("can't open school.dat\n"); fclose(fp); return; } fwrite(pfirst,sizeof(SCH),10,fp); fclose(fp); printf("文件已經成功保存\n"); } void main() { system("cls"); printf("\n\t\t\t 運動會分數統計\n"); printf("輸入學校數目 (x>= 5):"); scanf("%d",&nsc); printf("輸入男選手的項目(x<=20):"); scanf("%d",&msp); printf("輸入女選手項目(<=20):"); scanf("%d",&wsp); ntsp = msp + wsp; phead = (int *)calloc(ntsp,sizeof(int)); pafirst = phead; pasecond = phead; input(); calculate(); output(); Save(); }
標簽: 源代碼
上傳時間: 2016-12-28
上傳用戶:150501
#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
彩色實驗 文件:demo_color.m 1. 提取RGB圖像的三個分量,并分別顯示。 2. 合成偽彩色圖像。 3. 將RGB圖像轉換到HSI空間,并顯示三個分量。 4. 對原圖像的RGB三個分量分別進行平滑操作,將原圖像轉換到HSI空間對亮度分量進行平滑操作,計算兩種平滑操作方法的圖像差值。 5. 在RGB和HSI空間中用ice函數進行色彩調節。 壓縮實驗 文件:demo_huff.m 1. 計算矩陣f=[119 123 168 119;107 119 168 168;119 119 107 119;168 107 119 119]一階熵估計,并進行霍夫曼編碼。 2. 對Lena圖像進行霍夫曼編碼,并對編碼后圖像解碼。
上傳時間: 2019-01-19
上傳用戶:Rouxuan
漢中路到了。開左邊門,下車請注意安全。We are now at Hanzhong Road . Doors will open on the left。 本次列車終點站上海火車站。下一站終點站上海火車站,開左邊門。使用公交卡的乘客可在出站后30分鐘內換乘3號線、4號線,請注意換成列車的首末班車時間。打開metro大都會手機數碼乘地鐵。 Nest stop is the termina.station ShanghaiRailway station.Roors will open on the lift. 終點站上海火車站到了。開左邊門。下車請注意安全。請全體乘客下車。We are now at the termina.station Shanghai Railway station Roors will open on the lift.
上傳時間: 2019-07-05
上傳用戶:coolmen
產品型號(封裝形式): VK3702DM VK3702TM VK3702OM——(SOP8 ) VK3706OM VK3706OM VK3706DM VK3708BM VK3710IM——(SOP16) 產品品牌:VINTEK/元泰 產品年份:新年份 深圳永嘉微電原廠直銷,大量現貨更有優勢!讓您的生產高枕無憂。 聯系人:許碩 QQ:191 888 5898 TEL:188 9858 2398(微信) ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3702DM提供2個觸摸感應按鍵,一對一直接輸出,提供低功耗模式,可使用於電池應用的產品。對於防水和抗干擾方面有很優異的表現。 ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3702TM提供 2 個觸摸感應按鍵,一對一的 Toggle 模式輸出,提供低功耗模式,可使用於電池應用的產品。對於防水和抗干擾方面有很優異的表現 ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3702OM提供 2 個觸摸感應按鍵,一對一直接輸出,輸出為開漏(open drain)型態,適合作 AD 鍵。提供低功耗模式,可使用於電池應用的產品。對於防水和抗干擾方面有很優異的表現。 ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3706OM提供6個觸摸感應按鍵,一對一直接輸出,輸出為開漏(open drain)型態,適合作AD鍵。提供低功耗模式,可使用於電池應用的產品。對於防水和抗干擾方面有很優異的表現! ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3706DM提供6個觸摸感應按鍵,一對一直接輸出,提供低功耗模式,可使用於電池應用的產品。對於防水和抗干擾方面有很優異的表現! ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3708BM提供8個觸摸感應按鍵,二進制(BCD)編碼輸出,具有一個按鍵承認輸出的顯示,按鍵後的資料會維持到下次按鍵,可先判斷按鍵承認的狀態。提供低功耗模式,可使用於電池應用的產品。對於防水和抗干擾方面有很優異的表現! ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 產品描述 VK3710IM提供10個觸摸感應按鍵及兩線式串列界面,並有中斷輸出INT腳與MCU聯繫。提供低功耗模式,可使用於電池應用的產品。特性上對於防水和抗干擾方面有很優異的表現! 我們的優勢 1:我司為VINTEK/臺灣元泰半導體股份有限公司/VINKA的授權大中華區代理商,產品渠道正宗,確保原裝,大量庫存現貨! 2:公司工程力量雄厚,真誠技術服務支持,搭配原廠服務各種應用產品客戶。 3:好價格源自連接原廠直銷,你有量,我有價,確保原裝的好價格。 優勢代理元泰VKD常用觸控按鍵IC,簡介如下: 標準觸控IC-電池供電系列 VKD223EB --- 工作電壓/電流:2.0V-5.5V/5uA-3V 感應通道數:1 通訊接口 更長響應時間快速模式60mS,低功耗模式220ms 封裝:SOT23-6 VKD223B --- 工作電壓/電流:2.0V-5.5V/5uA-3V 感應通道數:1 通訊接口 更長響應時間快速模式60mS,低功耗模式220ms 封裝:SOT23-6 VKD232C --- 工作電壓/電流: 2.4V-5.5V/2.5uA-3V 感應通道數:2封裝:SOT23-6 通訊接口:直接輸出,低電平有效 固定為多鍵輸出模式,內建穩壓電路 VKD233DH(更小體積2*2)---工作電壓/電流: 2.4V-5.5V/2.5uA-3V 1按鍵 封裝:DFN6L 通訊接口:直接輸出,鎖存(toggle)輸出 有效鍵更長時間檢測16S VKD233DB(推薦) --- 工作電壓/電流: 2.4V-5.5V/2.5uA-3V 1感應按鍵 封裝:SOT23-6 通訊接口:直接輸出,鎖存(toggle)輸出 低功耗模式電流2.5uA-3V VKD233DH(推薦)---工作電壓/電流: 2.4V-5.5V/2.5uA-3V 1感應按鍵 封裝:SOT23-6 通訊接口:直接輸出,鎖存(toggle)輸出 有效鍵更長時間檢測16S 標準觸控IC-多鍵觸摸按鈕系列 VKD104SB/N --- 工作電壓/電流:2.4V-5.5V/13uA-3V 感應通道數/按鍵數:4 通訊接口:直接輸出,鎖存輸出,開漏輸出 封裝:SSOP-16 VKD104BC --- 工作電壓/電流:2.4V-5.5V/13uA-3V 感應通道數/按鍵數:4 通訊接口:直接輸出,鎖存輸出,開漏輸出 封裝:SOP-16 VKD104BR --- 工作電壓/電流:2.4V-5.5V/13uA-3V 感應通道數/按鍵數:2 通訊接口:直接輸出, toggle輸出 封裝:SOP-8 VKD104QB --- 工作電壓/電流:2.4V-5.5V/13uA-3V 感應通道數/按鍵數:4 通訊接口:直接輸出,鎖存輸出,開漏輸出 封裝:QFN-16 VKD1016B --- 工作電壓/電流:2.4V-5.5V/20uA-3V 感應通道數/按鍵數:16-8 通訊接口:直接輸出,鎖存輸出,開漏輸出 封裝:SSOP-28 VKD1016L --- 工作電壓/電流:2.4V-5.5V/20uA-3V 感應通道數:16-8 通訊接口:直接輸出,鎖存輸出,開漏輸出 封裝:SSOP-28 (元泰原廠授權 原裝保障 工程技術支持 大量現貨庫存) 標準觸控IC-VK36系列 VK3601SS --- 工作電壓/電流:2.4V-5.5V/1mA-5.0V 感應通道數:1 通訊接口:1 INPUT/1PWM OUT 封裝:SOP-8 VK3601S --- 工作電壓/電流:2.4V-5.5V/4mA-3.3V 感應通道數:1 通訊接口:1 INPUT/1PWM OUT 封裝:SOP-8 VK3602XS --- 工作電壓/電流:2.4V-5.5V/ 60uA-3V 感應通道數:2 通訊接口:2對2 toggle輸出 封裝:SOP-8 VK3602K --- 工作電壓/電流:2.4V-5.5V/ 60uA-3V 感應通道數:2 通訊接口:2對2 toggle輸出 封裝:SOP-8 VK3606DM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:6 通訊接口:1對1直接輸出 封裝:SOP-16 VK3606OM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:6 通訊接口:1對1開漏輸出 封裝:SOP-16 VK3608BM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:6 通訊接口:BCD碼直接輸出 封裝:SOP-16 VK3610IM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:6 通訊接口:SCL/SDA/INT通訊口 封裝:SOP-16 標準觸控IC-VK37系列 VK3702DM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:2 通訊接口:1對1直接輸出 封裝:SOP-8 VK3702OM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:2 通訊接口:1對1開漏輸出 封裝:SOP-8 VK3702TM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:2 通訊接口:1對1toggle輸出 封裝:SOP-8 VK3706DM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:6 通訊接口:1對1直接輸出 封裝:SOP-16 VK3706OM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:6 通訊接口:1對1開漏輸出 封裝:SOP-16 VK3708BM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:8 通訊接口:BCD碼直接輸出 封裝:SOP-16 VK3710IM --- 工作電壓/電流:3.1V-5.5V/ 3mA-5V 感應通道數:10 通訊接口:SCL/SDA/INT通訊口 封裝:SOP-16 標準觸控IC-VK38系列 VK3809IP --- 工作電壓/電流:2.5V-5.5V/1.1mA-3V 感應通道數:9 通訊接口:IIC/INT通訊口 封裝:SSOP-16 VK3813IP --- 工作電壓/電流:2.5V-5.5V/1.1mA-3V 感應通道數:13 通訊接口:IIC/INT通訊口 封裝:SSOP-20 VK3816IP --- 工作電壓/電流:2.5V-5.5V/1.1mA-3V 感應通道數:16 通訊接口:IIC/INT通訊口 封裝:SSOP-28 VK3816IP-A --- 工作電壓/電流:2.5V-5.5V/1.1mA-3V 感應通道數:16 通訊接口:IIC/INT通訊口 封裝:SSOP-28 以上介紹內容為IC參數簡介,難免有錯漏,且相關IC型號眾多,未能一一收錄。歡迎聯系索取完整資料及樣品! 生意無論大小,做人首重誠信!本公司全體員工將既往開來,再接再厲。爭取為各位帶來更專業的技術支持,更優質的銷售服務,更高性價比的好產品.竭誠希望能與各位客戶朋友深入溝通,攜手共進,共同成長,合作共贏!謝謝。
標簽: VK 3708 3710 BM IM 多按鍵 抗干擾 防水 操作 觸控
上傳時間: 2019-07-10
上傳用戶:szqxw1688
一.產品描述 提供6個觸摸感應按鍵,一對一直接輸出,輸出為開漏(opendrain)型態,適合作AD鍵。對於防水和抗干擾方面有很優異的表現! 二。產品特色 1.工作電壓範圍:3.1V – 5.5V 2.工作電流: 3mA@5V 3.6 個觸摸感應按鍵 4.提供一對一的直接輸出,未按鍵為開漏(open drain)型態輸出,按鍵時為低電平。 5.可以經由調整 CAP 腳的外接電容,調整靈敏度,電容越大靈敏度越高 6.具有防水及水漫成片水珠覆蓋在觸摸按鍵面板,按鍵仍可有效判別 7.內建 LDO 增加電源的抗干擾能力 三。 產品應用 各種大小家電,娛樂產品 四.功能描述 1.VK3606OM 於手指按壓觸摸盤,在 60ms 內輸出對應按鍵的狀態。 2.單鍵優先判斷輸出方式處理, 如果 K1 已經承認了, 需要等K1 放開後, 其他按鍵才能再被承認,同時間只有一個按鍵狀態會被輸出。 3.具有防呆措施, 若是按鍵有效輸出連續超過 10 秒, 就會做復位。 4.環境調適功能,可隨環境的溫濕度變化調整參考值,確保按鍵判斷工作正常。 5.可分辨水與手指的差異,對水漫與水珠覆蓋按鍵觸摸盤,仍可正確判斷按鍵動作。但水不可於按鍵觸摸盤上形成“水柱”,若如此則如同手按鍵一般,會有按鍵承認輸出。 6.內建 LDO 及抗電源雜訊的處理程序,對電源漣波的干擾有很好的耐受能力。 7.K0~K5 中不使用的按鍵請接地,避免太過靈敏而產生誤動。 8.D0~D5 中不使用的輸出請接地,避免浮接會有漏電流的情 況。
標簽: KEYS 3606 SOP 16 VK OM 抗干擾 防水
上傳時間: 2019-08-08
上傳用戶:szqxw1688
The concept of smart cities emerged few years ago as a new vision for urban development that aims to integrate multiple information and communication technology (ICT) solutions in a secure fashion to manage a city’s assets. Modern ICT infrastructure and e-services should fuel sustainable growth and quality of life, enabled by a wise and participative management of natural resources to be ensured by citizens and government. The need to build smart cities became a requirement that relies on urban development that should take charge of the new infrastructures for smart cities (broadband infrastructures, wireless sensor networks, Internet-based networked applications, open data and open platforms) and provide various smart services and enablers in various domains including healthcare, energy, education, environmental management, transportation, mobility and public safety.
上傳時間: 2020-05-25
上傳用戶:shancjb
Since the telephone was invented in the late nineteenth century, there has been a steady development of telephone services, and the number of subscribers has con- tinuously increased. One of the most revolutionary developments in telephone serv- ice in the late twentieth century was the introduction of the cellular variety of mobile phone services.
標簽: Engineering Capacity Systems CDMA
上傳時間: 2020-05-26
上傳用戶:shancjb
During the past decade, many wireless communication techniques have been developedto achievevariousgoals suchas higherdata rate,morerobustlink quality, and higher number of users in a given bandwidth. For wireless communication systems, depending on the availability of a feedback link, two approaches can be considered: namely open and closed loop. Open loop communication system that does not exploit the channel knowledge at the transmitter is now well understood from both a theoretical and practical point of view.
標簽: Communication Strategies Feedback Wireless for
上傳時間: 2020-05-27
上傳用戶:shancjb