定时器程序改变!
#include <stdio.h>
#include <time.h>
main()
{
clock_t start,end;
int n;
printf("How many seconds do you want to count? ");
scanf("%d",&n);
getchar();
clrscr();
start=end=clock();
while((n-(int)(end-start)/19)>=0&!kbhit())
{
printf("the time is: %d",n-(int)(end-start)/19);
sleep(1);
end=clock();
clrscr();
}
}
这程序是个定时器程序,谁帮我改一下啊,改成20点p1和p2输出1和1,24点输出1和0,6点输出0和0