亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

switch-case

  • Switch-Mode Power Supply

    Switch-Mode Power Supply

    標簽: Switch-Mode Supply Power

    上傳時間: 2020-06-07

    上傳用戶:shancjb

  • 二叉樹子系統(tǒng)

    #include<stdio.h> #define TREEMAX 100 typedef struct  BT { char data; BT *lchild; BT *rchild; }BT; BT *CreateTree(); void Preorder(BT *T); void Postorder(BT *T); void Inorder(BT *T); void Leafnum(BT *T); void Nodenum(BT *T); int TreeDepth(BT *T); int count=0; void main() { BT *T=NULL; char ch1,ch2,a; ch1='y'; while(ch1=='y'||ch1=='y') { printf("\n"); printf("\n\t\t             二叉樹子系統(tǒng)"); printf("\n\t\t*****************************************"); printf("\n\t\t           1---------建二叉樹            "); printf("\n\t\t           2---------先序遍歷            "); printf("\n\t\t           3---------中序遍歷            "); printf("\n\t\t           4---------后序遍歷            "); printf("\n\t\t           5---------求葉子數(shù)            "); printf("\n\t\t           6---------求結(jié)點數(shù)            "); printf("\n\t\t           7---------求樹深度            "); printf("\n\t\t           0---------返    回            "); printf("\n\t\t*****************************************"); printf("\n\t\t      請選擇菜單號 (0--7)"); scanf("%c",&ch2); getchar(); printf("\n"); switch(ch2) { case'1': printf("\n\t\t請按先序序列輸入二叉樹的結(jié)點:\n"); printf("\n\t\t說明:輸入結(jié)點(‘0’代表后繼結(jié)點為空)后按回車。\n"); printf("\n\t\t請輸入根結(jié)點:"); T=CreateTree(); printf("\n\t\t二叉樹成功建立!\n");break; case'2': printf("\n\t\t該二叉樹的先序遍歷序列為:"); Preorder(T);break; case'3': printf("\n\t\t該二叉樹的中序遍歷序列為:"); Inorder(T);break; case'4': printf("\n\t\t該二叉樹的后序遍歷序列為:"); Postorder(T);break; case'5': count=0;Leafnum(T); printf("\n\t\t該二叉樹有%d個葉子。\n",count);break; case'6': count=0;Nodenum(T); printf("\n\t\t該二叉樹總共有%d個結(jié)點。\n",count);break; case'7': printf("\n\t\t該樹的深度為:%d",TreeDepth(T)); break; case'0': ch1='n';break; default: printf("\n\t\t***請注意:輸入有誤!***"); } if(ch2!='0') { printf("\n\n\t\t按【Enter】鍵繼續(xù),按任意鍵返回主菜單!\n"); a=getchar(); if(a!='\xA') { getchar(); ch1='n'; } } } } BT *CreateTree() { BT *t; char x; scanf("%c",&x); getchar(); if(x=='0') t=NULL; else { t=new BT; t->data=x; printf("\n\t\t請輸入%c結(jié)點的左子結(jié)點:",t->data);         t->lchild=CreateTree(); printf("\n\t\t請輸入%c結(jié)點的右子結(jié)點:",t->data);         t->rchild=CreateTree();     } return t; } void Preorder(BT *T) { if(T) { printf("%3c",T->data); Preorder(T->lchild); Preorder(T->rchild); } } void Inorder(BT *T) { if(T) { Inorder(T->lchild); printf("%3c",T->data); Inorder(T->rchild); } } void Postorder(BT *T) { if(T) { Postorder(T->lchild); Postorder(T->rchild); printf("%3c",T->data); } } void Leafnum(BT *T) { if(T) { if(T->lchild==NULL&&T->rchild==NULL) count++; Leafnum(T->lchild); Leafnum(T->rchild); } } void Nodenum(BT *T) { if(T) { count++; Nodenum(T->lchild); Nodenum(T->rchild); } } int TreeDepth(BT *T) { int ldep,rdep; if(T==NULL) return 0; else { ldep=TreeDepth(T->lchild); rdep=TreeDepth(T->rchild); if(ldep>rdep) return ldep+1; else return rdep+1; } }

    標簽: 二叉樹 子系統(tǒng)

    上傳時間: 2020-06-11

    上傳用戶:ccccy

  • 數(shù)組子系統(tǒng)

    #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"); } }

    標簽: 數(shù)組 子系統(tǒng)

    上傳時間: 2020-06-11

    上傳用戶:ccccy

  • PID-小車類-基于Cortex-M0的BLDC電機驅(qū)動

    #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));}

    標簽: pid 電機 bldc

    上傳時間: 2022-06-01

    上傳用戶:kingwide

  • labview教程--Case結(jié)構(gòu)和Sequence結(jié)構(gòu)

    文檔為labview教程--Case結(jié)構(gòu)和Sequence結(jié)構(gòu)詳解文檔,是一份不錯的參考資料,感興趣的可以下載看看

    標簽: labview

    上傳時間: 2022-07-11

    上傳用戶:canderile

  • 高壓TSC無功補償技術(shù)的研究.rar

    高壓TSC(Thyristor Switch Capacitor)裝置是指額定工作電壓為6kV-35kV晶閘管投切電容器補償裝置,是一種典型靜止無功補償器,其對增強系統(tǒng)穩(wěn)定性、提高系統(tǒng)運行經(jīng)濟性,保證電壓質(zhì)量及改善電能質(zhì)量都能發(fā)揮良好的作用。目前國內(nèi)對高壓TSC裝置研制與生產(chǎn)還處于起步階段,加速高壓TSC裝置的國產(chǎn)化,對在我國電力系統(tǒng)中早日推廣與應(yīng)用高壓TSC裝置具有重大意義。 首先在無功功率的測量上,如何在有諧波干擾等復雜環(huán)境下準確檢測無功功率,本文采用了基于快速傅立葉變換的方法,可以很好的完成無功功率的采集。在主電路結(jié)構(gòu)上,晶閘管開關(guān)閥是高壓TSC裝置的關(guān)鍵構(gòu)成部件,高壓TSC裝置要求晶閘管開關(guān)應(yīng)具有良好的電氣性能,要求晶閘管開關(guān)應(yīng)是有效和可靠的。本文通過晶閘管特性和串聯(lián)技術(shù)的研究,給出了晶閘管串聯(lián)開關(guān)的靜態(tài)均壓和動態(tài)均壓方法,設(shè)計出合理使用的電路結(jié)構(gòu)。通過仿真分析,驗證了均壓電路的效果。 電容器無涌流投入技術(shù)也是TSC主要研究點,由于在高壓系統(tǒng)中器件兩端承受的電壓較高,低壓TSC系統(tǒng)中常用的過零固態(tài)繼電器或集成過零觸發(fā)芯片滿足不了耐壓的需要,本文設(shè)計了專門的過零檢測及觸發(fā)電路,在器件兩端電壓過零時觸發(fā),避免了由于電容器殘壓過高而造成的巨大沖擊電流,從而在硬件電路上實現(xiàn)電容器組的無過渡過程投切,電路簡單可靠。同時,在控制策略上將幾種投切判據(jù)進行了比較,采用了電壓無功復合投切判據(jù),以無功功率作為主判據(jù),電壓作為輔助判據(jù),有效地克服了僅以功率因數(shù)作為投切判據(jù)的控制方式中的輕載時容易產(chǎn)生投切振蕩而重載時容易出現(xiàn)補償不充分的缺點。

    標簽: TSC 無功補償技術(shù)

    上傳時間: 2013-05-24

    上傳用戶:6546544

  • CR6221 Current Mode PWM Power Switch

    CR6221 combines a dedicated current mode PWM controller with a high voltage power MOSFET. It is opti

    標簽: Current Switch Power 6221

    上傳時間: 2013-04-24

    上傳用戶:brucewan

  • CR6228 Current Mode PWM Power Switch

    CR6228 combines a dedicated current mode PWM controller with a high voltage power MOSFET. It is opti

    標簽: Current Switch Power 6228

    上傳時間: 2013-05-17

    上傳用戶:natopsi

  • P15V330

    P15V330 in video picel-rate switch applications

    標簽: P15V330

    上傳時間: 2013-04-24

    上傳用戶:關(guān)外河山

  • 交流功率因數(shù)轉(zhuǎn)換器

    交流功率因數(shù)轉(zhuǎn)換器 特點: 精確度0.25%滿刻度 ±0.25o 多種輸入,輸出選擇 輸入與輸出絕緣耐壓2仟伏特/1分鐘 沖擊電壓測試5仟伏特(1.2x50us) (IEC255-4,ANSI C37.90a/1974) 突波電壓測試2.5仟伏特(0.25ms/1MHz) (IEC255-4) 尺寸小,穩(wěn)定性高 主要規(guī)格: 精確度: 0.25% F.S. ±0.25°(23 ±5℃) 輸入負載: <0.2VA (Voltage) <0.2VA (Current) 最大過載能力: Current related input: 3 x rated continuous 10 x rated 30 sec. 25 x rated 3sec. 50 x rated 1sec. Voltage related input:maximum 2 x rated continuous 輸出反應(yīng)速度: < 250ms(0~90%) 輸出負載能力: < 10mA for voltage mode < 10V for current mode 輸出之漣波: < 0.1% F.S. 歸零調(diào)整范圍: 0~ ±5% F.S. 最大值調(diào)整范圍: 0~ ±10% F.S. 溫度系數(shù): 100ppm/℃ (0~50℃) 隔離特性: Input/Output/Power/Case 絕緣抗阻: >100Mohm with 500V DC 絕緣耐壓能力: 2KVac/1 min. (input/output/power/case) 突波測試: ANSI C37.90a/1974,DIN-IEC 255-4 impulse voltage 5KV(1.2x50us) 使用環(huán)境條件: -20~60℃(20 to 90% RH non-condensed) 存放環(huán)境條件: -30~70℃(20 to 90% RH non-condensed) CE認證: EN 55022:1998/A1:2000 Class A EN 61000-3-2:2000 EN 61000-3-3:1995/A1:2001 EN 55024:1998/A1:2001

    標簽: 交流 功率因數(shù)轉(zhuǎn)換器

    上傳時間: 2013-10-22

    上傳用戶:thing20

主站蜘蛛池模板: 偏关县| 上栗县| 中山市| 丰台区| 团风县| 大悟县| 乳源| 全州县| 梨树县| 当雄县| 东港市| 淮阳县| 岫岩| 抚远县| 奇台县| 惠安县| 浦县| 紫金县| 蓝田县| 永兴县| 金平| 明光市| 郎溪县| 山东省| 诏安县| 靖远县| 高邑县| 北碚区| 民县| 奎屯市| 平遥县| 专栏| 平遥县| 邵武市| 开封市| 定结县| 延寿县| 黄大仙区| 曲阜市| 葵青区| 惠州市|