请哪位C语言编程高手帮我编个打铃系统程序

来源:百度知道 编辑:UC知道 时间:2024/05/12 15:53:52
8:00、8:50、9:00、9:50、10:00、10:50、11:00、11:50、14:00、14:50、15:00、15:50、16:00、16:50、17:00、17:50、19:00、 9:50、20 :00、20:50 在这些时间点给喇叭输出个高电平 那位高手帮我解决下 谢谢
谁能帮我做下 我有原理图 还有另外几部分的 电路的驱动程序 就是不晓得把他们组合成一个完成的程序....请高手帮忙下

#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 就行了