回覆列表
  • 1 # 使用者551921813817

    #include

    typedef unsigned char uint8;

    typedef unsigned int uint16;

    sbit anjian = P1^0; //按鍵位

    void delay(uint16 h) //延時程式

    {

    while(h--);

    }

    main()

    { uint8 k = 0 , i = 0;

    P0 = 0xff;

    anjian = 1;

    while(1)

    {

    P0 = ~(1

    if(anjian == 0)

    {

    delay(200);

    if(anjina == 0) i++;

    if(i == 3)

    i = 0;

    }

    switch(i)

    {

    case 0: delay(10000);break;

    case 1: delay(20000);break;

    case 2: delay(20000); break;

    }

    if(k==8) k=0;

    }

    }

  • 中秋節和大豐收的關聯?
  • 在等紅燈時被追尾了,撞得很嚴重,應該要車輛折損費嗎?