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

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

getchar

  • 歐幾里德算法:輾轉求余  原理: gcd(a,b)=gcd(b,a mod b)  當b為0時,兩數的最大公約數即為a  getchar()會接受前一個scanf的回車符

    歐幾里德算法:輾轉求余  原理: gcd(a,b)=gcd(b,a mod b)  當b為0時,兩數的最大公約數即為a  getchar()會接受前一個scanf的回車符

    標簽: gcd getchar scanf mod

    上傳時間: 2014-01-10

    上傳用戶:2467478207

  • 本庫利用51的timer2

    本庫利用51的timer2,9600bps適用于有片內外部存儲器的51芯片占用32byte緩存,重寫putchar,getchar函數,循環隊列,后臺操作。

    標簽: timer2

    上傳時間: 2014-01-12

    上傳用戶:plsee

  • RtosSerial.lib rtosSerial.h 使用說明

    RtosSerial.lib rtosSerial.h 使用說明,本庫利用51的timer2,9600bps適用于有片內外部存儲器的51芯片占用32byte緩存,重寫putchar,getchar函數,循環隊列,后臺操作。 可與rtx51很好集成。任何人可以自由分發,和應用。有疑問可以聯系serialrtos@163.net

    標簽: RtosSerial rtosSerial lib 使用說明

    上傳時間: 2014-01-21

    上傳用戶:lindor

  • MIPS架構下串口API函數集合,包括getcharputcharscanfprintf

    MIPS架構下串口API函數集合,包括getchar\putchar\scanf\printf

    標簽: getcharputcharscanfprintf MIPS API 架構

    上傳時間: 2015-05-16

    上傳用戶:TRIFCT

  • 高質量C++編程 電子版 林銳  如果輸入參數以值傳遞的方式傳遞對象

    高質量C++編程 電子版 林銳  如果輸入參數以值傳遞的方式傳遞對象,則宜改用“const &”方式來傳遞,這樣可以省去臨時對象的構造和析構過程,從而提高效率。  【規則6-2-2】函數名字與返回值類型在語義上不可沖突。 違反這條規則的典型代表是C標準庫函數getchar

    標簽: 61548 高質量 編程 電子版

    上傳時間: 2013-12-17

    上傳用戶:CHENKAI

  • AVR306串口程序例子----查詢模式 Application Note AVR306 * Polled mode driver for UART, this is the similar to

    AVR306串口程序例子----查詢模式 Application Note AVR306 * Polled mode driver for UART, this is the similar to the * library default putchar() and getchar() in ICCAVR

    標簽: Application AVR 306 similar

    上傳時間: 2013-12-31

    上傳用戶:ryb

  • ①把settle定義成char型變量 ②settle=(settle>= A && settle <= B ) 寫錯了

    ①把settle定義成char型變量 ②settle=(settle>= A && settle <= B ) 寫錯了,改成(settle>= A && settle <= Z ) ③scanf函數后面加一句getchar()用來吸收回車鍵

    標簽: settle char gt lt

    上傳時間: 2017-04-21

    上傳用戶:moshushi0009

  • C語言用戶注冊及登錄

    #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> main(void) {   char new_name[4], name[4];     int new_sn ,sn;     printf("        【注冊】\n\n");     printf("請輸入用戶名(四位英文字母):");     scanf("%s", &new_name);     printf("請輸入密碼(六位數字):") ;     scanf("%d" ,&new_sn);    /*system("PAUSE");*/     system("CLS");/*清屏*/        /*system("PAUSE");*/        printf("  【登陸】\n\n");        printf("輸入用戶名:");        scanf("%s" , &name);        if(!strcmp(new_name,name)){printf("輸入用戶名錯誤!"); }/*判斷用戶是否正確*/     printf("輸入密碼:");     scanf("%d" , &sn);     if(new_sn != sn){printf("輸入密碼錯誤!"); }/*判斷密碼是否正確*/     system("CLS");     printf("恭喜你,登陸成功!\n");        getchar();     return 0;     }

    標簽: C語言

    上傳時間: 2015-12-30

    上傳用戶:gjatd1987

  • c語言程序源

    #include <iostream> using namespace std; class Student { public: Student(int, int); int num; int grade; }; Student::Student(int n, int g) { num = n; grade = g; } int maxGradeIndex(Student* s) { int maxGrade, index = 0, i = 0; maxGrade = s[0].grade; for (i = 0; i<5; i++) { if (s[i].grade > maxGrade) { maxGrade = s[i].grade; index = i; } } return  index; } int main() { Student a[5] = { Student(1, 86), Student(2, 60), Student(3, 72), Student(4, 95), Student(5, 66) }; int maxGradeStNum = maxGradeIndex(a); cout << "成績最好學生的學號是:" << a[maxGradeStNum].num << endl; cout << "成績最好學生的成績是:" << a[maxGradeStNum].grade << endl; getchar(); return 0; }

    標簽: c語言 程序

    上傳時間: 2016-04-23

    上傳用戶:burt1025

  • 運動會源代碼

    #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

主站蜘蛛池模板: 孝义市| 南京市| 定襄县| 雅江县| 开封市| 屏东县| 平南县| 南宁市| 开化县| 塔城市| 凤山县| 克什克腾旗| 新干县| 广灵县| 集安市| 华宁县| 甘肃省| 延川县| 广州市| 太原市| 莲花县| 阿拉善左旗| 吉首市| 右玉县| 商城县| 陵川县| 海淀区| 修武县| 玉龙| 红安县| 漳浦县| 延川县| 抚州市| 綦江县| 沛县| 尼木县| 锦州市| 阿拉善左旗| 栖霞市| 静乐县| 寿光市|