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

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

單片機(jī)計(jì)算器

  • 遙控解碼通過電腦串口顯示 /* 晶振:11.0569MHz */ #include <REGX52.h> #define uchar unsigned char uchar d

    遙控解碼通過電腦串口顯示 /* 晶振:11.0569MHz */ #include <REGX52.h> #define uchar unsigned char uchar data IRcode[4] //定義一個4字節的數組用來存儲代碼 uchar CodeTemp //編碼字節緩存變量 uchar i,j,k //延時用的循環變量 sbit IRsignal=P3^2 //HS0038接收頭OUT端直接連P3.2(INT0) /**************************延時0.9ms子程序**********************/ void Delay0_9ms(void) {uchar j,k for(j=18 j>0 j--) for(k=20 k>0 k--) } /***************************延時1ms子程序**********************/ void Delay1ms(void) {uchar i,j for(i=2 i>0 i--) for(j=230 j>0 j--) }

    標簽: uchar unsigned 11.0569 include

    上傳時間: 2013-12-12

    上傳用戶:Breathe0125

  • Instead of finding the longest common subsequence, let us try to determine the length of the LCS.

    Instead of finding the longest common subsequence, let us try to determine the length of the LCS. 􀂄 Then tracking back to find the LCS. 􀂄 Consider a1a2…am and b1b2…bn. 􀂄 Case 1: am=bn. The LCS must contain am, we have to find the LCS of a1a2…am-1 and b1b2…bn-1. 􀂄 Case 2: am≠bn. Wehave to find the LCS of a1a2…am-1 and b1b2…bn, and a1a2…am and b b b b1b2…bn-1 Let A = a1 a2 … am and B = b1 b2 … bn 􀂄 Let Li j denote the length of the longest i,g g common subsequence of a1 a2 … ai and b1 b2 … bj. 􀂄 Li,j = Li-1,j-1 + 1 if ai=bj max{ L L } a≠b i-1,j, i,j-1 if ai≠j L0,0 = L0,j = Li,0 = 0 for 1≤i≤m, 1≤j≤n.

    標簽: the subsequence determine Instead

    上傳時間: 2013-12-17

    上傳用戶:evil

  • Fluent中文教程 pdf格式

    Fluent中文教程 pdf格式,對于開始學習Fluent的人來說相當適用,可以按照本書學習! I、目錄 第一章、開始 第二章、操作界面 第三章、文件的讀寫 第四章、單位系統 第五章、讀入和操作網格 第六章、邊界條件 第七章、物理特性 第八章、基本物理模型 第九章、湍流模型 第十章、輻射模型 第十一章、化學輸運與反應流 第十二章、污染形成模型 第十三章、相變模擬 第十四章、多相流模型 第十五章、動坐標系下的流動 第十六章、解算器的使用 第十七章、網格適應 第十八章、數據顯示與報告界面 第十九章、圖形與可視化 第二十章、Alphanumeric Report 第二十一章、流場函數定義 第二十二章、并行處理 第二十三章、自定義函數 第二十四章、參考向導 第二十五章、索引(Bibliograph 第二十六章、命令索引 II、如何使用該教程

    標簽: Fluent 教程

    上傳時間: 2013-12-18

    上傳用戶:netwolf

  • //初始化 initscr() //獲得屏幕尺寸 getmaxyx(stdscr, h, w) //畫背景 for(i=0 i<h i++)

    //初始化 initscr() //獲得屏幕尺寸 getmaxyx(stdscr, h, w) //畫背景 for(i=0 i<h i++) for(j=0 j<w j++){ mvaddch(i, j, ACS_CKBOARD) } refresh() //建立窗口 pad = newpad(80, 128) for(i=0 i<80 i++){ char line[128] sprintf(line, "This line in pad is numbered d\n", i) mvwprintw(pad, i, 0, line) } //刷新屏幕 refresh() prefresh(pad, 0, 1, 5, 10, 20, 45) for(i=0 i<50 i++){ prefresh(pad, i+1, 1, 5, 10, 20, 45) usleep(30000) } //等待按鍵 getch()

    標簽: getmaxyx initscr stdscr for

    上傳時間: 2014-08-30

    上傳用戶:龍飛艇

  • 文件Java排課系統的報告

    My JSP 'TeacherMain.jsp' starting page var $=function(id) { return document.getElementById(id); } function show_menu(num){ for(i=0;i

    標簽: C++

    上傳時間: 2015-07-03

    上傳用戶:xiyuzhu

  • 離散實驗 一個包的傳遞 用warshall

     實驗源代碼 //Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("請輸入矩陣第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可傳遞閉包關系矩陣是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元關系的可傳遞閉包\n"); void warshall(int,int); int k , n; printf("請輸入矩陣的行數 i: "); scanf("%d",&k); 四川大學實驗報告 printf("請輸入矩陣的列數 j: "); scanf("%d",&n); warshall(k,n); } 

    標簽: warshall 離散 實驗

    上傳時間: 2016-06-27

    上傳用戶:梁雪文以

  • 多項式計算代碼

    void DFS(MGraph G, int i) {     int j;     visited[i] = TRUE;     printf("%c ",    G.vexs[i]);     for (j=0; j<G.numVertexes; ++j)     {         if (G.arc[i][j]!=INFINITY  &&  !visited[j])             DFS(G, j);     } }

    標簽: 多項式 代碼 計算

    上傳時間: 2016-12-28

    上傳用戶:chenyameng

  • 運動會源代碼

    #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

  • java學生數據庫

    /*import java.util.Scanner; //主類 public class student122 {   //主方法   public static void main(String[] args){     //定義7個元素的字符數組     String[] st = new String[7];     inputSt(st);       //調用輸入方法     calculateSt(st);   //調用計算方法     outputSt(st);      //調用輸出方法   }   //其他方法   //輸入方法 private static void inputSt(String st[]){     System.out.println("輸入學生的信息:");   System.out.println("學號 姓名 成績1,2,3");   //創建鍵盤輸入類   Scanner ss = new Scanner(System.in);   for(int i=0; i<5; i++){     st[i] = ss.next(); //鍵盤輸入1個字符串   } }   //計算方法 private static void calculateSt(String[] st){   int sum = 0;         //總分賦初值 int ave = 0;         //平均分賦初值 for(int i=2;i<5;i++) {   /計總分,字符變換成整數后進行計算   sum += Integer.parseInt(st[i]); } ave = sum/3;         //計算平均分 //整數變換成字符后保存到數組里 st[5] = String.valueOf(sum); st[6] = String.valueOf(ave); }   //輸出方法 private static void outputSt(String[] st){     System.out.print("學號 姓名 ");   //不換行   System.out.print("成績1 成績2 成績3 ");   System.out.println("總分 平均分");//換行   //輸出學生信息   for(int i=0; i<7; i++){     //按格式輸出,小于6個字符,補充空格     System.out.printf("%6s", st[i]);   }   System.out.println();            //輸出換行 } }*/   import java.util.Scanner;   public class student122 {   public static void main(String[] args) { // TODO 自動生成的方法存根 String[][] st = new String[3][8]; inputSt(st); calculateSt(st); outputSt(st); }   //輸入方法 private static void inputSt(String st[][]) { System.out.println("輸入學生信息:"); System.out.println("班級 學號 姓名 成績:數學 物理 化學"); //創建鍵盤輸入類 Scanner ss = new Scanner(System.in); for(int j = 0; j < 3; j++) { for(int i = 0; i < 6; i++) { st[j][i] = ss.next(); } } } //輸出方法 private static void outputSt(String st[][]) { System.out.println("序號 班級 學號 姓名 成績:數學 物理 化學 總分 平均分"); //輸出學生信息 for(int j = 0; j < 3; j++) { System.out.print(j+1 + ":"); for(int i = 0; i < 8; i++) { System.out.printf("%6s", st[j][i]); } System.out.println(); } }     //計算方法     private static void calculateSt(String[][] st)     {      int sum1 = 0;      int sum2 = 0; int sum3 = 0;      int ave1 = 0;      int ave2 = 0;      int ave3 = 0;      for(int i = 3; i < 6; i++)      {      sum1 += Integer.parseInt(st[0][i]);      }      ave1 = sum1/3;           for(int i = 3; i < 6; i++)      {      sum2 += Integer.parseInt(st[1][i]);      }      ave2 = sum2/3;           for(int i = 3; i < 6; i++)      {      sum3 += Integer.parseInt(st[2][i]);      }      ave3 = sum3/3;           st[0][6] = String.valueOf(sum1);      st[1][6] = String.valueOf(sum2);      st[2][6] = String.valueOf(sum3);      st[0][7] = String.valueOf(ave1);      st[1][7] = String.valueOf(ave2);      st[2][7] = String.valueOf(ave3);     } }

    標簽: java 數據庫

    上傳時間: 2017-03-17

    上傳用戶:simple

  • java入門編程合集

    題目:古典問題:有一對兔子,從出生后第3個月起每個月都生一對兔子,小兔子長到第三個月后每個月又生一對兔子,假如兔子都不死,問每個月的兔子總數為多少?    //這是一個菲波拉契數列問題 public class lianxi01 { public static void main(String[] args) { System.out.println("第1個月的兔子對數:    1"); System.out.println("第2個月的兔子對數:    1"); int f1 = 1, f2 = 1, f, M=24;      for(int i=3; i<=M; i++) {       f = f2;       f2 = f1 + f2;       f1 = f;       System.out.println("第" + i +"個月的兔子對數: "+f2);          } } } 【程序2】    題目:判斷101-200之間有多少個素數,并輸出所有素數。 程序分析:判斷素數的方法:用一個數分別去除2到sqrt(這個數),如果能被整除, 則表明此數不是素數,反之是素數。    public class lianxi02 { public static void main(String[] args) {     int count = 0;     for(int i=101; i<200; i+=2) {      boolean b = false;      for(int j=2; j<=Math.sqrt(i); j++)      {         if(i % j == 0) { b = false; break; }          else           { b = true; }      }         if(b == true) {count ++;System.out.println(i );}                                   }     System.out.println( "素數個數是: " + count); } } 【程序3】    題目:打印出所有的 "水仙花數 ",所謂 "水仙花數 "是指一個三位數,其各位數字立方和等于該數本身。例如:153是一個 "水仙花數 ",因為153=1的三次方+5的三次方+3的三次方。 public class lianxi03 { public static void main(String[] args) {      int b1, b2, b3; 

    標簽: java 編程

    上傳時間: 2017-12-24

    上傳用戶:Ariza

主站蜘蛛池模板: 衢州市| 同仁县| 全南县| 莱西市| 哈密市| 华亭县| 榆树市| 清丰县| 巍山| 亚东县| 大丰市| 海原县| 平乐县| 隆昌县| 永福县| 汤阴县| 梁河县| 新干县| 北流市| 曲阳县| 平远县| 乌恰县| 获嘉县| 安溪县| 临泉县| 谷城县| 陆河县| 南雄市| 扎鲁特旗| 山东省| 临泽县| 双流县| 甘泉县| 德钦县| 芒康县| 九台市| 江城| 广西| 军事| 六安市| 沙洋县|