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

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

Main

  • 已知數據文件IN.dat中存有200個四位數

    已知數據文件IN.dat中存有200個四位數,并已調用讀函數rData()把這些數存入數組a中,請編寫函數spellNum(),其功能是:把個位數字和千位數字重新組成一個新的二位數(新二位數的十位數字是原四位數的個位數字,新二位數的個位數字是原四位數的千位數字),以及把百位數字和十位數字組成另一個新的二位數(新二位數的十位數字是原四位數的百位數字,新二位數的個位數字是原四位數的十位數字),如果新組成的兩個二位數一個是奇數,另一個為偶數,并且兩個二位數中至少有一個數能被17整除,同時兩個新數的十位數字均不為0,則將滿足此條件的四位數按從大到小的順序存入數組b中,并要計算滿足上述條件的四位數的個數count。最后Main()函數調用寫函數wData(),把結果count以及數組b中符合條件的四位數輸出到OUT.dat文件中。

    標簽: 200 dat IN 數據文件

    上傳時間: 2014-10-29

    上傳用戶:李彥東

  • TdcHintEx Provides your users with a cool transparent hint. It replaces standard Delphi hint wind

    TdcHintEx Provides your users with a cool transparent hint. It replaces standard Delphi hint window. Just drop a TdcHintEx in your Main form. Set Enabled to True. And run your application. Oh btw, please set ShowHint to True.. :) Drop me a line, and tell me what you think of it. Antony Hoon antony7777@telkom.net

    標簽: hint transparent TdcHintEx Provides

    上傳時間: 2014-01-12

    上傳用戶:181992417

  • 全景圖像和多光譜圖像融合

    PixelFusion.dsp     This file (the project file) contains information at the project level and     is used to build a single project or subproject. Other users can share the     project (.dsp) file, but they should export the makefiles locally. PixelFusion.h     This is the Main header file for the application.  It includes other     project specific headers (including Resource.h) and declares the     CPixelFusionApp application class. PixelFusion.cpp     This is the Main application source file that contains the application     class CPixelFusionApp. PixelFusion.rc     This is a listing of all of the Microsoft Windows resources that the     program uses.  It includes the icons, bitmaps, and cursors that are stored     in the RES subdirectory.  This file can be directly edited in Microsoft Visual C++. PixelFusion.clw     This file contains information used by ClassWizard to edit existing     classes or add new classes.  ClassWizard also uses this file to store     information needed to create and edit message maps and dialog data     maps and to create prototype member functions.

    標簽: his brovey

    上傳時間: 2015-03-16

    上傳用戶:313777423

  • toj 4022源代碼

    #include <iostream> using namespace std; int Main(){ int t; cin>>t; while(t--){ long long n; cin>>n; if(n%2==1) cout<<(n*n-1)/4<<endl; else if (n%4==0) cout <<(n*n)/4-1<<endl; else{ if(n==2) cout<<1<<endl; else{ long long k=n/2-1; cout <<k*k+2*k-3<<endl; } } } return 0; }

    標簽: 天津大學acm4022 代碼

    上傳時間: 2015-04-20

    上傳用戶:nr607

  • 兩個鏈表的交集

    兩個鏈表的交集 #include<stdio.h> #include<stdlib.h> typedef struct Node{   int data;   struct  Node *next; }Node; void initpointer(struct Node *p){   p=NULL; } int  printlist(struct Node* head){   int flag=1;   head=head->next;   /*   因為標記1的地方你用了頭結點,所以第一個數據域無效,應該從下一個頭元結點開始   */   if(head==NULL)     printf("NULL\n");   else   {     while(head!=NULL)     {       if(flag==1)       {       printf("%d",head->data);       flag=0;       }       else       {         printf(" %d",head->data);       }       head=head->next;     }     printf("\n");   }   return 0; } struct Node *creatlist(struct Node *head) {      int n;    struct  Node *p1=(struct Node *)malloc(sizeof(struct Node));   p1->next=NULL; while(scanf("%d",&n),n!=-1) {   struct Node *pnode=(struct Node *)malloc(sizeof(struct Node));   pnode->next=NULL;      pnode->data=n;   if(head==NULL)     head=pnode;   p1->next=pnode;   p1=pnode; } return head; } struct Node *Intersect(struct Node *head1, struct Node *head2) { struct Node *p1=head1,*p2=head2;/*我這里沒有用頭指針和頭結點,這里是首元結點head1里面就是第一個數據,一定要理解什么事頭指針, 頭結點,和首元結點 具體你一定要看這個博客:http://blog.sina.com.cn/s/blog_71e7e6fb0101lipz.html*/ struct Node *head,*p,*q; head = (struct Node *)malloc(sizeof(struct Node)); head->next = NULL; p = head; while( (p1!=NULL)&&(p2!=NULL) ) { if (p1->data == p2->data) { q = (struct Node *)malloc(sizeof(struct Node)); q->data = p1->data; q->next = NULL; p->next = q;//我可以認為你這里用了頭結點,也就是說第一個數據域無效     **標記1** p = q; p1 = p1->next; p2 = p2->next; } else if (p1->data < p2->data) { p1 = p1->next; } else { p2 = p2->next; } } return head; } int Main() {   struct Node *head=NULL,*headt=NULL,*t;   //initpointer(head);//這里的函數相當于head=NULL;  // initpointer(headt);//上面已經寫了headt=NULL那么這里可以不用調用這個函數   head=creatlist(head);   headt=creatlist(headt);   t=Intersect(head,headt);   printlist(t); }

    標簽: c語言編程

    上傳時間: 2015-04-27

    上傳用戶:coco2017co

  • stm32小量iap

    1.此代碼基于紅牛開發板,請根據自己的板子進行修改。 2.通過修改網上的代碼實現,修改前的功能開了一個很大的緩存接收app數據,然后一次性全部數據寫入, 但是這個在實際應用中沒多大用,所以修改為一次寫入128個字節。 3.程序flash的偏移地址為0x8010000,所以app編譯前應該在mdk中設置 Option窗口->Target頁->IROM1,start 改為 0x8010000 4.設置中斷向量重映射,我用的方法是在app端的Main函數起始位置添加語句 SCB->VTOR = FLASH_BASE | 0x10000; 5.啟動時如果發現沒有app,會進入bootloader模式(燈全亮),如果發現有程序就要看程序的功能了。 如果有app,但是又想重新升級的話就按住某個鍵(我這里是Tamper),然后按復位,松開復位之前不要松開 按鍵,這樣就會進入bootloader模式。 6.進入bootloader后通過串口1接收升級app數據,bin文件數據,接收完成后按User1鍵進行升級操作,完成后 復位或者按User2鍵可以運行剛寫入的app。

    標簽: stm32 iap

    上傳時間: 2015-05-18

    上傳用戶:llma2017

  • 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

  • 用定時器以間隔500MS在6位數碼管上依次顯示0、1、 2、3….C、D、E、F,重復。

    #include<reg51.h> #define uchar unsigned char #define uint unsigned int uint i,j; sbit dula=P2^6; sbit wela=P2^7; uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d, 0x7d,0x07,0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71}; void Main() {  j=0; i=0;     TMOD=0X01; TH0=(65536-50000)/256; TL0=(65536-50000)%6; EA=1; ET0=1; TR0=1; while(1); } void time0() interrupt 1 { TH0=(65536-50000)/256; TL0=(65536-50000)%6;     i++; if(i==15) { P0=table[j]; dula=1; dula=0; P0=0XC0; wela=1; wela=0; j++; i=0; if(j==16) { j=0; } } }

    標簽: 用定時器以間隔500MS在6位數碼管上依次顯示0、1、 2、3….C、D、E、F,重復。

    上傳時間: 2016-02-11

    上傳用戶:嬌縱Pamper

  • AVR單片機轉速表

    /****************************************************************                  外部晶振8M                  PA0~3:四位數碼管的位選                  PB0~7:數碼管的8位段選                  外部中斷0用于計數                  定時器0溢出中斷的定時為1ms                  說明 :檢測到水流較小時,繼電器延時1秒關閉  ******************************************************************/                #include<iom16v.h>   #include<macros.h>   #define uchar unsigned char   #define uint unsigned int       char led_7[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};  //數碼管段選        char position[4]={0xfe,0xfd,0xfb,0xf7};//數碼管位選        uint sumnum=0;  //用于記錄1000ms內進入中斷的次數        uint time=0;   //記錄進入比較定時器0的次數        uint num=0;     //記錄1ms內進入中斷的次數        uint count=0;   //進入外部中斷0的次數        uchar flag;        uint sumnum1;   //記錄100ms內的數目       /***************************函數聲明***************************/        void delay();        void display(uint m );        void init();        void init_0();        void init_2();    void _delay_us(uint l)   {        unsigned int i;        for(i=0;i<l;i++)        {        asm("nop");        }   }           /**************************主函數***********************************/       void Main()   {        init();        init_0();        init_2();        while(sumnum<5)        {           PORTD=0XBF;           segdisplay(sumnum1);        }       while(1)       {           segdisplay(sumnum1);       }           }        /*************************掃描數碼管時的延時函數*********************/        void delay()    {         uchar i,j;         for(i=6;i>0;i--)         for(j=225;j>0;j--);    }        /************************數碼管顯示函數*****************************/       void segdisplay( int temp)        {         int seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};         int temp1,temp2,temp3,temp4;         temp1=temp/1000;         temp2=(temp/100)%10;         temp3=(temp/10)%10;         temp4=temp%10;         DDRB=0xff;         DDRA|=0x0f;           PORTA=~BIT(3);           PORTB=seg[temp1];           _delay_us(100);           PORTA=~BIT(2);           PORTB=seg[temp2];           _delay_us(100);           PORTA=~BIT(1);           PORTB=seg[temp3];           _delay_us(100);           PORTA=~BIT(0);           PORTB=seg[temp4];           _delay_us(100);       }        /***********************管腳初始化函數*********************/        void init()    {                      DDRD|=0X40;   //PD4 設置為輸出             PORTD=0XBF;                DDRA=0XFF;             DDRB=0XFF;             PORTA=0XFF;             PORTB=0XFF;    }        /***********************外部中斷0初始化*********************/        void init_0()    {         MCUCR=0X02;   //INT0為下降沿觸發         GICR=0X40;   //使能INT0中斷         SREG=0X80;  //使能總中斷    }        /**********************定時器2初始化***********************/        void init_2()    {         TCCR0=0x03;   // 內部時鐘,64 分頻(8M/64=125KHz)          TCNT0=0x83;   //裝初值           TIMSK=0x01;   // 允許 T/C0溢出中斷中斷      }          /***********************外部中斷0子函數********************/        #pragma interrupt_handler int0_isr:2        void int0_isr(void)        {             count++;        }        /*********************定時計數器0溢出中斷子函數*****************/       #pragma interrupt_handler int0_over:10        void int0_over(void)       {           TCNT0=0x83;   //重裝初值            if((time%100) == 0)               sumnum1 = num;           if(time == 1000)           {               sumnum=num;               if(sumnum<10)               {                                      if((flag==1)&&(sumnum<10))                   {                       PORTD=0XFF;                       flag=0;                   }                                      flag++;               }               else                       PORTD=0XBF;               num=0;               time=0;           }           num+=count;           count=0;           ++time;        } 

    標簽: C語言

    上傳時間: 2016-03-09

    上傳用戶:彥 yan

  • 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

主站蜘蛛池模板: 怀来县| 万州区| 铜鼓县| 哈巴河县| 修武县| 双鸭山市| 德江县| 静海县| 拉孜县| 阜康市| 锦州市| 天峻县| 晋城| 喜德县| 噶尔县| 广元市| 三亚市| 武功县| 古蔺县| 濮阳县| 伊金霍洛旗| 彝良县| 柞水县| 商水县| 信丰县| 营口市| 阜城县| 南部县| 许昌县| 平湖市| 邻水| 霍林郭勒市| 梁山县| 罗江县| 北碚区| 松潘县| 衡水市| 吉水县| 黄龙县| 宜章县| 乌兰察布市|