當前位置:編程學習大全網 - 編程軟體 - 請哪位C語言編程高手幫我編個打鈴系統程序

請哪位C語言編程高手幫我編個打鈴系統程序

#include "stdafx.h"

#include "windows.h"

#include "time.h"

int main(int argc, char* argv[])

{

int a[]={8,8,9,9,10,10,11,11,14,14,15,15,16,16,17,17,19,19,20,20};

int b[]={0,50,0,50,0,50,0,50,0,50,0,50,0,50,0,50,0,50,0,50};

int c,i;

struct tm *local;

time_t t;

t=time(NULL);

local=localtime(&t);

while(1)

{

for(i=0;i<20;i++)

{ if (a[i]==local->tm_hour&&b[i]==local->tm_min)

c=1;

else

c=0;

}

}

}

妳看行嗎 在指定的 時間段 使輸出 C=1 高電平

妳在設計個 接口 接受 C 就行了

  • 上一篇:JAVA怎麽念
  • 下一篇:STM32F103ZET6和STM32F103C8T6編程不壹樣嗎
  • copyright 2024編程學習大全網